Trying to help....
On Sun, Sep 20, 2009 at 9:50 PM, Chetan Nanda <[email protected]> wrote:
> Resending it again ... earlier mails report an error ...
>
> On Sat, Sep 19, 2009 at 2:47 PM, Chetan Nanda <[email protected]> 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 [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ