> I developed a kernel module. Within that i am
> dynamically allocating memory(using kmalloc and
> vmalloc) for a buffer to read data. After that while
> trying to read into this buffer from the hard disk
> using sys_read i am getting an error. And the same
> error i am getting while writing into another buffer,
> which was allocated in the same way, using sys_write.
> The error number set is -14(EFAULT) i.e., Bad address.
> Give me any idea to resolve the problem.
> If anyone help me i am gretful to them.
space one. You need something like :
oldfs = get_fs();
nread = sys_read(fd, buf, cnt);
(If you really want to do that)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/