免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3928 | 回复: 3

insmod出现unknown symbol:cpuset_cpus_allowed...求指教 [复制链接]

论坛徽章:
0
发表于 2011-07-18 16:06 |显示全部楼层
insmod    scst_vdisk.ko后,出现
insmod: error inserting 'dev_handlers/scst_vdisk.ko': -1 Unknown symbol in module
用dmesg查看:
scst_vdisk: Unknown symbol cpuset_cpus_allowed

于是在scst_vdisk.c里加入了
EXPORT_SYMBOL_GPL(cpuset_cpus_allowed);
也试过
EXPORT_SYMBOL(cpuset_cpus_allowed);
均没有解决问题。
尝试查看: cat /proc/kallsyms | grep cpuset_cpus_allowed
显示:c04463b0 T cpuset_cpus_allowed
系统中有这个函数阿。

下面貼处涉及cpuset_cpus_allowed的源代码:

static int asyfresh_thread(void *data)

{

        printk(KERN_ALERT "OK,thread start!\n");

       

        struct scst_blockio_cache *scst_cache =(struct scst_blockio_cache *)(data);

        struct asyfresh_work my_work;

        cpumask_t cpus_allowed;

        set_user_nice(current, 0);

        cpus_allowed = cpuset_cpus_allowed(current);

        set_cpus_allowed(current, cpus_allowed);

        my_work.thr = scst_cache->vdisk_thr;

        return __asyfresh_thread(&my_work);

}


求指点阿。。解决这个insmod的问题

论坛徽章:
0
发表于 2011-07-18 16:32 |显示全部楼层
这么多人看了。没有人回答啊。。
斑竹呢?

论坛徽章:
0
发表于 2011-07-20 01:24 |显示全部楼层
cpuset_cpus_allowed was not exported from the kernel. In other words, you cannot use it when your module is not compiled into the kernel. If you want to call it in a module, put the "EXPORT_SYMBOL_GPL(cpuset_cpus_allowed);" into the file kernel/cpuset.c, and then compiling  and installing your kernel.

论坛徽章:
0
发表于 2011-07-20 09:54 |显示全部楼层
回复 3# xiaohutou
OK,Thank you. I'll try it ...
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP