Re: copy_to_user/copy_from_user in interrupt context

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

 



Trying to help....

On Sun, Sep 20, 2009 at 9:50 PM, Chetan Nanda <chetannanda@xxxxxxxxx> wrote:
> Resending it again ... earlier mails report an error ...
>
> On Sat, Sep 19, 2009 at 2:47 PM, Chetan Nanda <chetannanda@xxxxxxxxx> wrote:
>>
>> Hi,
>>
>> I have small doubt regarding copy_to_user/copy_from_user macros:
>>
>> -Can these macros be used in interrupt context.. what if page belong to
>> user address is not in memory (not loaded/swapped out)?

well, AFAIK copy_{to,from}_user can deal with swapped out pages, but
then....you can guess it can not be used from interrupt context since
it will block.

>> -If we use copy_to_user in interrupt context, then how can this be assure
>> that data is copied into correct process buffer?
>> As at a time of interrupt it can't be guaranteed that intended user
>> process is the current process running.

You're right, it can be in any currently running process context.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer
blog: the-hydra.blogspot.com

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