Re: vmalloc, kmalloc and in_irq() & in_softirq()

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

 



The memory allocator can sleep to fetch you the requested memory. It is 
never wise to sleep in the interrupt context.
Prefer using kmalloc(, GFP_ATOMIC).

Thanks,
Sumit

----- Original Message -----
From: Lukas Ruf <ruf@maremma.ch>
Date: Thursday, April 25, 2002 9:31 pm
Subject: vmalloc, kmalloc and in_irq() & in_softirq()

> 
> Dear all,
> 
> am I right that vmalloc() should not be called while a kernel 
> module is
> in in_irq() or in_softirq() ?
> 
> My station crashes all the time :-)
> 
> To be sure that I do not run in such a problem, I must use
> kmalloc(,GFP_KERNEL) or kmalloc(, GFP_ATOMIC) ?  Which one?
> 
> In Rusty's Unreliable Kernel Hacking Guide, I only found the different
> semantics of the functions but not the remark on where they must not
> be called.
> 
> Thanks for any help and explanation.  
> 
> -- 
> Lukas Ruf    
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 
begin:vcard
n:Agarwal;Sumit
fn:Sumit Agarwal
tel;cell:+919845205210
tel;fax:+91-80-5732696
tel;home:+919845205210
tel;work:+91-805732296 / 93 extn. 5243
url:www.wipro.com
org:Wipro Technologies;SIDC, Embedded and Internet Division
adr:;;Wipro Technologies, Chamundi Complex, No.26, Hosur Main Road, Bommanahalli;Bangalore;Karnataka;560068;INDIA
version:2.1
email;internet:sumit.agarwal@wipro.com
title:Senior Software Engineer
end:vcard


**************************Disclaimer************************************
Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual or entity to which it is addressed. You are notified that any
use, copying or dissemination of the information contained in the E-MAIL
in any manner whatsoever is strictly prohibited.
********************************************************************

[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