Re: kmem_cache_alloc in interrupt context

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

 



On Wed 11 June 2003 14:23, Rahul Sahgal wrote:
> Hi all,
> is it safe to call kmem_cache_alloc/free from interrupt handler ?

Only if you use the appropriare gfp_mask.

In interrupt context you can't kmalloc with GFP_KERNEL because this could  block current process when reclaiming memory.
You need to use GFP_ATOMIC mask in interrupt context.

( look at include/linux/mm.h )


Hope this help.


Daniele.


PGP PKEY      http://pgp.mit.edu:11371/pks/lookup?search=belch76@libero.it&op=index
ICQ#               104896040  
Netphone/Fax  178.605.7063
Homepage       http://web.tiscali.it/bellucda




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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