Hi Rui,
Thank you for your review.
2013/04/16 17:17, Wang, Rui Y wrote:
-----Original Message-----
From: Yasuaki Ishimatsu <[email protected]>
Date: Mon, 15 Apr 2013 11:15:28 +0900
Subject: [Bug fix PATCH] resource: Reusing a resource structure allocated by
bootmem
To: [email protected]
Cc: [email protected], [email protected], [email protected],
[email protected], Yasuaki Ishimatsu <[email protected]>
<<...>>
+ 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/