Re: is __copy_to_user_inatomic is really atomic ?

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

 



On Thu, 2007-02-22 at 18:02 +0530, Aneesh Kumar wrote:
> On 2/22/07, Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:
> > On Wed, 2007-02-21 at 12:34 +0530, Aneesh Kumar wrote:
> > > Hi,
> > >
> > > Is __copy_from_user_inatomic and __copy_to_user_inatomic really atomic
> >
> > if you call the _inatomic version you, the caller, are supposed to have
> > pinned the memory first, to make sure it's not swapped out. If it is
> > anyway, you'll get a error return code, no attempt is made to fault the
> > page back in.
> >
> >
> 
> I am trying to locate the code for that. As far as i can see both the
> version __copy_to_user and __copy_to_user_inatomic  doesn't have much
> difference.  Also i looked at do_page_fault and i can see it finding
> vma. So where is it coded that it will not fault the page back in for
> _inatomic version ?

it can't happen because the caller pinned the page in the first place..

-- 
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org


--
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