lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E52B2D9.5070904@linux.vnet.ibm.com>
Date:	Mon, 22 Aug 2011 14:49:45 -0500
From:	Seth Jennings <sjenning@...ux.vnet.ibm.com>
To:	Dan Carpenter <error27@...il.com>
CC:	gregkh@...e.de, devel@...verdev.osuosl.org,
	dan.magenheimer@...cle.com, ascardo@...oscopio.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: zcache: fix possible sleep under lock

On 08/22/2011 02:09 PM, Dan Carpenter wrote:
> On Mon, Aug 22, 2011 at 01:47:49PM -0500, Seth Jennings wrote:
>> zcache_new_pool() calls kmalloc() with GFP_KERNEL which has
>> __GFP_WAIT set.  However, zcache_new_pool() gets called on
>> a stack that holds the swap_lock spinlock, leading to a
>> possible sleep-with-lock situation. The lock is obtained
>> in enable_swap_info().
>>
>> The patch replaces GFP_KERNEL with GFP_IOFS, which is
>> GFP_KERNEL & ~__GFP_WAIT.
>>
> 
> You should use GFP_ATOMIC.  We don't want to do IO with the locks
> held.  The only reason GFP_IOFS exists is so that we can turn off
> io during suspend and resume.
> 
> regards,
> dan carpenter
> 
Actually, should this be GFP_ATOMIC or GFP_NOWAIT?

--
Seth
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ