Re: is __copy_to_user_inatomic is really atomic ?

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

 



On 2/21/07, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Hi Aneesh...


> Hi,
>
> Is __copy_from_user_inatomic and __copy_to_user_inatomic really atomic
> ?.
Looking from the name and the code, I think the operation is clearly non
atomic, especially if it copies larger than data bus (am I right?) size
e.g 32 bit for 32 bit CPU.

> What is the implication of zeroing the tail ?
I don't get it, which tail were you referring to?





__copy_from_user differs from __copy_from_user_inatomic only int hat
the former put zero in the area that it failed to copy. And then it
adds a might_sleep();. I am confused how adding zero to the tail
results in sleep. In my understanding we can sleep due to page in from
swap and that would  happen in case of __copy_from_user_inatomic also.


-aneesh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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