linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Do not fail if we cannot register a slab with sysfs
@ 2007-08-22 22:14 Christoph Lameter
  2007-08-22 22:39 ` David Miller, Christoph Lameter
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Lameter @ 2007-08-22 22:14 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, davem

Do not BUG() if we cannot register a slab with sysfs. Just print an
error. The only consequence of not registering is that the slab cache
is not visible via /sys/slab. A BUG() may not be visible that
early during boot and we have had multiple issues here already.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
 mm/slub.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 930e6dc..9a57d46 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3813,7 +3813,9 @@ static int __init slab_sysfs_init(void)
 
 	list_for_each_entry(s, &slab_caches, list) {
 		err = sysfs_slab_add(s);
-		BUG_ON(err);
+		if (err)
+			printk(KERN_ERR "SLUB: Unable to add boot slab %s"
+						" to sysfs\n", s->name);
 	}
 
 	while (alias_list) {
@@ -3821,7 +3823,9 @@ static int __init slab_sysfs_init(void)
 
 		alias_list = alias_list->next;
 		err = sysfs_slab_alias(al->s, al->name);
-		BUG_ON(err);
+		if (err)
+			printk(KERN_ERR "SLUB: Unable to add boot slab alias"
+					" %s to sysfs\n", s->name);
 		kfree(al);
 	}
 

--
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 related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Do not fail if we cannot register a slab with sysfs
  2007-08-22 22:14 [PATCH] Do not fail if we cannot register a slab with sysfs Christoph Lameter
@ 2007-08-22 22:39 ` David Miller, Christoph Lameter
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller, Christoph Lameter @ 2007-08-22 22:39 UTC (permalink / raw)
  To: clameter; +Cc: akpm, linux-mm

> Do not BUG() if we cannot register a slab with sysfs. Just print an
> error. The only consequence of not registering is that the slab cache
> is not visible via /sys/slab. A BUG() may not be visible that
> early during boot and we have had multiple issues here already.
> 
> Signed-off-by: Christoph Lameter <clameter@sgi.com>

Acked-by: David S. Miller <davem@davemloft.net>

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

end of thread, other threads:[~2007-08-22 22:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-22 22:14 [PATCH] Do not fail if we cannot register a slab with sysfs Christoph Lameter
2007-08-22 22:39 ` David Miller, Christoph Lameter

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