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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <516DE6AC.3000602@jp.fujitsu.com>
Date:	Wed, 17 Apr 2013 09:02:52 +0900
From:	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
To:	"Wang, Rui Y" <rui.y.wang@...el.com>
CC:	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"rientjes@...gle.com" <rientjes@...gle.com>,
	"linuxram@...ibm.com" <linuxram@...ibm.com>,
	"toshi.kani@...com" <toshi.kani@...com>
Subject: Re: [Bug fix PATCH] resource: Reusing a resource structure allocated
 by bootmem

Hi Rui,

Thank you for your review.

2013/04/16 17:17, Wang, Rui Y wrote:
>> -----Original Message-----
>> From: Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
>> Date: Mon, 15 Apr 2013 11:15:28 +0900
>> Subject: [Bug fix PATCH] resource: Reusing a resource structure allocated by
>> bootmem
>> To: akpm@...ux-foundation.org
>> Cc: linux-kernel@...r.kernel.org, rientjes@...gle.com, linuxram@...ibm.com,
>> toshi.kani@...com, Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
>> <<...>>
>> +	if (bootmem_resource.sibling) {
>> +		spin_lock(&bootmem_resource_lock);
>> +		res = bootmem_resource.sibling;
>> +		bootmem_resource.sibling = res->sibling;
>> +		spin_unlock(&bootmem_resource_lock);
>> +		memset(res, 0, sizeof(struct resource));
>> +	} else {
>> +		res = kzalloc(sizeof(struct resource), flags);
>> +	}
>

> bootmem_resource_lock does not protect the if() statement from accessing bootmem_resource.sibling.
>
> spin_lock(&bootmem_resource_lock);
> if (bootmem_resource.sibling) {

You are right. I'll update it.

Thanks,
Yasuaki Ishimatsu

> ...
>
> Rui
>


--
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