Re: how to use copy_to_user function...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jaydeep Chokshi wrote:
I am confused, how to use copy_to_user function. I
register a file thru module in /proc say test_proc.
now i used copy_from_user function to copy data writtened
to the file test_proc and stored in static global char
array. now while reading back that file if i use
copy_to_user function then it gives me Fault, so i
used the snprintf() function to copy data in user
buffer.
Wrong. You should not do this.
Post the code, must be some kind of programming error.

Om.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux