linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] slub: Fix slub_lock down/up imbalance
@ 2010-10-28  9:50 Pavel Emelyanov
  2010-10-28 13:44 ` Christoph Lameter
  0 siblings, 1 reply; 5+ messages in thread
From: Pavel Emelyanov @ 2010-10-28  9:50 UTC (permalink / raw)
  To: Christoph Lameter, Pekka Enberg, Matt Mackall, Linux MM

There are two places, that do not release the slub_lock.

Respective bugs were introduced by sysfs changes ab4d5ed5 (slub: Enable 
sysfs support for !CONFIG_SLUB_DEBUG) and 2bce6485 ( slub: Allow removal
of slab caches during boot).

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/mm/slub.c b/mm/slub.c
index 8fd5401..981fb73 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3273,9 +3273,9 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
 		kfree(n);
 		kfree(s);
 	}
+err:
 	up_write(&slub_lock);
 
-err:
 	if (flags & SLAB_PANIC)
 		panic("Cannot create slabcache %s\n", name);
 	else
@@ -3862,6 +3862,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
 			x += sprintf(buf + x, " N%d=%lu",
 					node, nodes[node]);
 #endif
+	up_read(&slub_lock);
 	kfree(nodes);
 	return x + sprintf(buf + x, "\n");
 }

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slub: Fix slub_lock down/up imbalance
  2010-10-28  9:50 [PATCH] slub: Fix slub_lock down/up imbalance Pavel Emelyanov
@ 2010-10-28 13:44 ` Christoph Lameter
  2010-11-08 14:40   ` Pavel Emelyanov
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Lameter @ 2010-10-28 13:44 UTC (permalink / raw)
  To: Pavel Emelyanov; +Cc: Pekka Enberg, Matt Mackall, Linux MM

On Thu, 28 Oct 2010, Pavel Emelyanov wrote:

> There are two places, that do not release the slub_lock.

Acked-by: Christoph Lameter <cl@linux.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slub: Fix slub_lock down/up imbalance
  2010-10-28 13:44 ` Christoph Lameter
@ 2010-11-08 14:40   ` Pavel Emelyanov
  2010-11-08 17:17     ` Pekka Enberg
  2010-11-09 16:03     ` Christoph Lameter
  0 siblings, 2 replies; 5+ messages in thread
From: Pavel Emelyanov @ 2010-11-08 14:40 UTC (permalink / raw)
  To: Christoph Lameter, Pekka Enberg; +Cc: Matt Mackall, Linux MM

On 10/28/2010 05:44 PM, Christoph Lameter wrote:
> On Thu, 28 Oct 2010, Pavel Emelyanov wrote:
> 
>> There are two places, that do not release the slub_lock.
> 
> Acked-by: Christoph Lameter <cl@linux.com>
> 

Thanks!

Gentlemen, I believe you've been very busy these days, but can
you please share with me what are your plans about this patch?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slub: Fix slub_lock down/up imbalance
  2010-11-08 14:40   ` Pavel Emelyanov
@ 2010-11-08 17:17     ` Pekka Enberg
  2010-11-09 16:03     ` Christoph Lameter
  1 sibling, 0 replies; 5+ messages in thread
From: Pekka Enberg @ 2010-11-08 17:17 UTC (permalink / raw)
  To: Pavel Emelyanov; +Cc: Christoph Lameter, Matt Mackall, Linux MM

Hi Pavel,

On 8.11.2010 16.40, Pavel Emelyanov wrote:
> On 10/28/2010 05:44 PM, Christoph Lameter wrote:
>> On Thu, 28 Oct 2010, Pavel Emelyanov wrote:
>>
>>> There are two places, that do not release the slub_lock.
>>
>> Acked-by: Christoph Lameter<cl@linux.com>
>>
>
> Thanks!
>
> Gentlemen, I believe you've been very busy these days, but can
> you please share with me what are your plans about this patch?

Sorry for not being explicit, it's sitting in for-next and I'll send it 
to Linus in the next batch:

http://git.kernel.org/?p=linux/kernel/git/penberg/slab-2.6.git;a=shortlog;h=refs/heads/for-next

			Pekka

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slub: Fix slub_lock down/up imbalance
  2010-11-08 14:40   ` Pavel Emelyanov
  2010-11-08 17:17     ` Pekka Enberg
@ 2010-11-09 16:03     ` Christoph Lameter
  1 sibling, 0 replies; 5+ messages in thread
From: Christoph Lameter @ 2010-11-09 16:03 UTC (permalink / raw)
  To: Pavel Emelyanov; +Cc: Pekka Enberg, Matt Mackall, Linux MM

On Mon, 8 Nov 2010, Pavel Emelyanov wrote:

> Gentlemen, I believe you've been very busy these days, but can
> you please share with me what are your plans about this patch?

Pekka is going to merge it as far as I can tell.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-09 16:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-28  9:50 [PATCH] slub: Fix slub_lock down/up imbalance Pavel Emelyanov
2010-10-28 13:44 ` Christoph Lameter
2010-11-08 14:40   ` Pavel Emelyanov
2010-11-08 17:17     ` Pekka Enberg
2010-11-09 16:03     ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox