get data to user space from kernel

sebastien person (sebastien.person@sycomore.fr)
Tue, 15 May 2001 15:30:39 +0200


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/