get data to user space from kernel

From: sebastien person (sebastien.person@sycomore.fr)
Date: Tue May 15 2001 - 08:30:39 EST


Hi,

I have a network driver that get specific informations from device
but I can't envisage the size of the informations. So I do a kmalloc
call when data come.

But my problem seems to come from the kmalloc because when I try to
send data to user space via an ioctl call I get a segmentation fault.

One solution would be to pass fixed size beetween the both but it
isn't the cleaner.

I've heard about copy_to_user method , is it the best way ?
Is there a way to create a struct in user space dynamicaly from kernel
space ?

thanks for any help ...

sebastien person
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 15 2001 - 21:00:41 EST