From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akio Takebe Subject: Re: [Patch] linux: avoid kmalloc while disabling interrupts Date: Tue, 09 Sep 2008 17:35:28 +0900 Message-ID: <48C63550.2090704@jp.fujitsu.com> References: <48C628BC.8090805@jp.fujitsu.com> <48C64E76.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <48C64E76.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Jan Beulich wrote: >>>> Akio Takebe 09.09.08 09:41 >>> >> We should avoid using kmalloc while interrupts is disabled. >> kmalloc may sleep. >> >> Signed-off-by: Akio Takebe > > I was under the impression that this is why the code uses GFP_ATOMIC. > > Also, doesn't that patch introduce new problems, in dropping the lock > intermediately and then adding entries to lists without checking for > already existing entries again? I'd suppose if you want the allocations > to be done outside of the lock, you should do them in advance > (regardless of whether you'll actually need them) and free the memory > after dropping the lock if the entries weren't really inserted anywhere. > Sorry for my confusion. As you said, it's my mistake. Best Regards, Akio Takebe