Re: copy_to_user/copy_from_user in interrupt context

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

 



Hi,

On Sat, Sep 19, 2009 at 11:17 AM, 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)?
If you look for copy_to_user definition in function description is written:
User context only. This function may sleep. So no you can't use it in interrupt
routines.
> -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.
>
> These may be silly question but create some confusion for me....
>
> Thanks,
> Chetan Nanda
>

good luck,

Marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.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