linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Kernel WARNING splat in 3.14-rc1
@ 2014-02-03 20:04 Larry Finger
  2014-02-03 20:39 ` David Rientjes
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2014-02-03 20:04 UTC (permalink / raw)
  To: linux-mm, LKML

On my freshly built 3.14-rc1 kernel, I get the following new warning splat from 
slub:

[   69.008845] ------------[ cut here ]------------
[   69.008861] WARNING: CPU: 0 PID: 1578 at mm/slub.c:1007 
deactivate_slab+0x4bb/0x520()
[   69.008863] Modules linked in: rfcomm nfs fscache af_packet lockd sunrpc bnep 
rtl8723be arc4 rtl8723_common b43 rtl_pci rtlwifi mac80211 cfg80211 btusb bl
uetooth powernow_k8 kvm_amd kvm snd_hda_intel snd_hda_codec bcma snd_hwdep r852 
sdhci_pci sdhci snd_pcm sr_mod snd_seq ssb cdrom forcedeth sm_common pcspkr s
nd_timer serio_raw snd_seq_device snd nand mtd mmc_core rfkill ata_generic 
pata_amd nand_ids nand_bch bch nand_ecc 6lowpan_iphc soundcore btcoexist r592 ac v
ideo memstick button battery sg dm_mod autofs4 thermal processor thermal_sys hwmon
[   69.008934] CPU: 0 PID: 1578 Comm: akonadi_newmail Not tainted 3.14.0-rc1-wl+ #60
[   69.008936] Hardware name: Hewlett-Packard HP Pavilion dv2700 Notebook 
PC/30D6, BIOS F.27 11/27/2008
[   69.008939]  0000000000000009 ffff880085ab1cd0 ffffffff815ee4a0 0000000000000000
[   69.008945]  ffff880085ab1d08 ffffffff8104e768 ffffea0001ee69c0 ffff8800bb401800
[   69.008950]  0000000000000000 ffff8800bb400c80 0000000000000002 ffff880085ab1d18
[   69.008956] Call Trace:
[   69.008965]  [<ffffffff815ee4a0>] dump_stack+0x4d/0x6f
[   69.008971]  [<ffffffff8104e768>] warn_slowpath_common+0x78/0xa0
[   69.008976]  [<ffffffff8104e845>] warn_slowpath_null+0x15/0x20
[   69.008980]  [<ffffffff8118581b>] deactivate_slab+0x4bb/0x520
[   69.008985]  [<ffffffff81183429>] ? new_slab+0x1f9/0x300
[   69.008989]  [<ffffffff815ebe57>] __slab_alloc+0x34d/0x4f5
[   69.008994]  [<ffffffff81185a6b>] ? kmem_cache_alloc+0x18b/0x1c0
[   69.008999]  [<ffffffff810770d1>] ? prepare_creds+0x21/0x1a0
[   69.009003]  [<ffffffff810770d1>] ? prepare_creds+0x21/0x1a0
[   69.009007]  [<ffffffff81185a6b>] kmem_cache_alloc+0x18b/0x1c0
[   69.009011]  [<ffffffff810770d1>] prepare_creds+0x21/0x1a0
[   69.009016]  [<ffffffff8119f955>] SyS_access+0x35/0x1f0
[   69.009019]  [<ffffffff815fe8a2>] system_call_fastpath+0x16/0x1b
[   69.009019] ---[ end trace c63f75644bfb030a ]---

There is a similar warning for my other CPU as well. The warning comes from 
"lockdep_assert_held(&n->list_lock);".

If needed, I can bisect this issue.

Larry

--
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] 6+ messages in thread

* Re: Kernel WARNING splat in 3.14-rc1
  2014-02-03 20:04 Kernel WARNING splat in 3.14-rc1 Larry Finger
@ 2014-02-03 20:39 ` David Rientjes
  2014-02-03 22:34   ` Christoph Lameter
  2014-02-03 23:08   ` Larry Finger
  0 siblings, 2 replies; 6+ messages in thread
From: David Rientjes @ 2014-02-03 20:39 UTC (permalink / raw)
  To: Larry Finger, Pekka Enberg
  Cc: Peter Zijlstra, Christoph Lameter, linux-mm, LKML

Commit c65c1877bd68 ("slub: use lockdep_assert_held") incorrectly required 
that add_full() and remove_full() hold n->list_lock.  The lock is only 
taken when kmem_cache_debug(s), since that's the only time it actually 
does anything.

Require that the lock only be taken under such a condition.

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: David Rientjes <rientjes@google.com>
---
 mm/slub.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1004,21 +1004,19 @@ static inline void slab_free_hook(struct kmem_cache *s, void *x)
 static void add_full(struct kmem_cache *s,
 	struct kmem_cache_node *n, struct page *page)
 {
-	lockdep_assert_held(&n->list_lock);
-
 	if (!(s->flags & SLAB_STORE_USER))
 		return;
 
+	lockdep_assert_held(&n->list_lock);
 	list_add(&page->lru, &n->full);
 }
 
 static void remove_full(struct kmem_cache *s, struct kmem_cache_node *n, struct page *page)
 {
-	lockdep_assert_held(&n->list_lock);
-
 	if (!(s->flags & SLAB_STORE_USER))
 		return;
 
+	lockdep_assert_held(&n->list_lock);
 	list_del(&page->lru);
 }
 

--
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] 6+ messages in thread

* Re: Kernel WARNING splat in 3.14-rc1
  2014-02-03 20:39 ` David Rientjes
@ 2014-02-03 22:34   ` Christoph Lameter
  2014-02-03 23:08   ` Larry Finger
  1 sibling, 0 replies; 6+ messages in thread
From: Christoph Lameter @ 2014-02-03 22:34 UTC (permalink / raw)
  To: David Rientjes; +Cc: Larry Finger, Pekka Enberg, Peter Zijlstra, linux-mm, LKML

On Mon, 3 Feb 2014, David Rientjes wrote:

> Commit c65c1877bd68 ("slub: use lockdep_assert_held") incorrectly required
> that add_full() and remove_full() hold n->list_lock.  The lock is only
> taken when kmem_cache_debug(s), since that's the only time it actually
> does anything.

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] 6+ messages in thread

* Re: Kernel WARNING splat in 3.14-rc1
  2014-02-03 20:39 ` David Rientjes
  2014-02-03 22:34   ` Christoph Lameter
@ 2014-02-03 23:08   ` Larry Finger
  2014-02-03 23:41     ` Paul E. McKenney
  1 sibling, 1 reply; 6+ messages in thread
From: Larry Finger @ 2014-02-03 23:08 UTC (permalink / raw)
  To: David Rientjes, Pekka Enberg
  Cc: Peter Zijlstra, Christoph Lameter, linux-mm, LKML

On 02/03/2014 02:39 PM, David Rientjes wrote:
> Commit c65c1877bd68 ("slub: use lockdep_assert_held") incorrectly required
> that add_full() and remove_full() hold n->list_lock.  The lock is only
> taken when kmem_cache_debug(s), since that's the only time it actually
> does anything.
>
> Require that the lock only be taken under such a condition.
>
> Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
> Signed-off-by: David Rientjes <rientjes@google.com>

You may add a "Tested-by: Larry Finger <Larry.Finger@lwfinger.net>". The patch 
cleans up the splat on my system. Thanks for the quick response.

Larry

--
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] 6+ messages in thread

* Re: Kernel WARNING splat in 3.14-rc1
  2014-02-03 23:08   ` Larry Finger
@ 2014-02-03 23:41     ` Paul E. McKenney
  2014-02-03 23:44       ` [patch for-3.14] mm, slub: list_lock may not be held in some circumstances David Rientjes
  0 siblings, 1 reply; 6+ messages in thread
From: Paul E. McKenney @ 2014-02-03 23:41 UTC (permalink / raw)
  To: Larry Finger
  Cc: David Rientjes, Pekka Enberg, Peter Zijlstra, Christoph Lameter,
	linux-mm, LKML

On Mon, Feb 03, 2014 at 05:08:11PM -0600, Larry Finger wrote:
> On 02/03/2014 02:39 PM, David Rientjes wrote:
> >Commit c65c1877bd68 ("slub: use lockdep_assert_held") incorrectly required
> >that add_full() and remove_full() hold n->list_lock.  The lock is only
> >taken when kmem_cache_debug(s), since that's the only time it actually
> >does anything.
> >
> >Require that the lock only be taken under such a condition.
> >
> >Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
> >Signed-off-by: David Rientjes <rientjes@google.com>
> 
> You may add a "Tested-by: Larry Finger <Larry.Finger@lwfinger.net>".
> The patch cleans up the splat on my system. Thanks for the quick
> response.

Please feel free to add mine as well:

Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

And also feel free to ignore my patch as well.  ;-)

							Thanx, Paul

--
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] 6+ messages in thread

* [patch for-3.14] mm, slub: list_lock may not be held in some circumstances
  2014-02-03 23:41     ` Paul E. McKenney
@ 2014-02-03 23:44       ` David Rientjes
  0 siblings, 0 replies; 6+ messages in thread
From: David Rientjes @ 2014-02-03 23:44 UTC (permalink / raw)
  To: Paul E. McKenney, Andrew Morton, Pekka Enberg
  Cc: Larry Finger, Peter Zijlstra, Christoph Lameter, linux-mm, LKML

Commit c65c1877bd68 ("slub: use lockdep_assert_held") incorrectly required 
that add_full() and remove_full() hold n->list_lock.  The lock is only 
taken when kmem_cache_debug(s), since that's the only time it actually 
does anything.

Require that the lock only be taken under such a condition.

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: David Rientjes <rientjes@google.com>
---
 mm/slub.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1004,21 +1004,19 @@ static inline void slab_free_hook(struct kmem_cache *s, void *x)
 static void add_full(struct kmem_cache *s,
 	struct kmem_cache_node *n, struct page *page)
 {
-	lockdep_assert_held(&n->list_lock);
-
 	if (!(s->flags & SLAB_STORE_USER))
 		return;
 
+	lockdep_assert_held(&n->list_lock);
 	list_add(&page->lru, &n->full);
 }
 
 static void remove_full(struct kmem_cache *s, struct kmem_cache_node *n, struct page *page)
 {
-	lockdep_assert_held(&n->list_lock);
-
 	if (!(s->flags & SLAB_STORE_USER))
 		return;
 
+	lockdep_assert_held(&n->list_lock);
 	list_del(&page->lru);
 }
 

--
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] 6+ messages in thread

end of thread, other threads:[~2014-02-03 23:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-03 20:04 Kernel WARNING splat in 3.14-rc1 Larry Finger
2014-02-03 20:39 ` David Rientjes
2014-02-03 22:34   ` Christoph Lameter
2014-02-03 23:08   ` Larry Finger
2014-02-03 23:41     ` Paul E. McKenney
2014-02-03 23:44       ` [patch for-3.14] mm, slub: list_lock may not be held in some circumstances David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).