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: <4FEBA354.9030609@kernel.org>
Date:	Thu, 28 Jun 2012 09:20:36 +0900
From:	Minchan Kim <minchan@...nel.org>
To:	Seth Jennings <sjenning@...ux.vnet.ibm.com>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org,
	Dan Magenheimer <dan.magenheimer@...cle.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Robert Jennings <rcj@...ux.vnet.ibm.com>,
	Nitin Gupta <ngupta@...are.org>
Subject: Re: [PATCH 2/3] zsmalloc: add generic path and remove x86 dependency

On 06/28/2012 04:09 AM, Seth Jennings wrote:

> On 06/27/2012 12:28 AM, Minchan Kim wrote:
>>> +{
>>> +	if (area->vm)
>>> +		return 0;
>>
>>
>> Just out of curiosity.
>> When do we need above check?
> 
> I did this in the case that there was a race between the for
> loop in zs_init(), calling zs_cpu_notifier(), and a CPU
> coming online.  I've never seen the condition hit, but if it
> did, it would leak memory without this check.
> 


Could you add this as a comment?



> I would move the cpu notifier registration after the loop in
> zs_init(), but then I could miss a cpu up event and we
> wouldn't have the needed per-cpu resources for mapping.
> 
> All other suggestions are accepted.  Thanks for the feedback!
> 



Thanks!

-- 
Kind regards,
Minchan Kim
--
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