现在测试一个简单的Linux下的驱动程序
如果不用copy_to_user,copy_from_user,则可以顺利通过
但用copy_to_user或者copy_from_user,就出错
我只是用copy做简单的测试,如下:
static int write_Test(struct inode * inode, struct file * file,
char * buffer, int count)
{
char tmp1[20];
copy_from_user(tmp1,buffer,count);
return 0;}
编译能通过,但是不能加载:
Warning: loading test.o will taint the kernel: forced load
test.o: init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
You may find more information in syslog or the output from dmesg
不知有什么错,望各位指点!
关键词:
insmod
错误