LKML Archive on
help / color / mirror / Atom feed
* Adjusting destination pointer with copy_to_user
@ 2007-02-12  9:39 Timur Aydin
  0 siblings, 0 replies; only message in thread
From: Timur Aydin @ 2007-02-12  9:39 UTC (permalink / raw)
  To: linux-kernel


I am passing a packet consisting of a fixed length header and a
variable length data block to a user mode application. The user mode
application passes the pointer of its buffer with an ioctl call
(buff_ptr). When the driver receives buff_ptr, it makes two calls to
pass the packet to user mode:

copy_to_user(buff_ptr, header, header_size);
copy_to_user(buff_ptr + header_size, data, data_size);

Is this a valid usage? Or can I only use buff_ptr here?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-12 10:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12  9:39 Adjusting destination pointer with copy_to_user Timur Aydin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).