mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Neil Brown <neilb@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: SLUB: kmem_cache_destroy doesn't - version 2.
Date: Thu, 19 Apr 2007 22:18:20 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0704192215420.16306@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <17960.16739.870487.497750@notabene.brown>

On Fri, 20 Apr 2007, Neil Brown wrote:

> Not sure how best to fix this one.... kmem_cache_destroy currently
> doesn't know which alias is being destroyed.

The aliases are there for decorative purposes when running without
debugging. If one switches on debugging then it matters but then the
symlinks are not created since there will be no aliases.

I guess we can ignore the problem?


Index: linux-2.6.21-rc6/mm/slub.c
===================================================================
--- linux-2.6.21-rc6.orig/mm/slub.c	2007-04-19 22:13:28.000000000 -0700
+++ linux-2.6.21-rc6/mm/slub.c	2007-04-19 22:15:31.000000000 -0700
@@ -3351,9 +3351,19 @@ static int sysfs_slab_alias(struct kmem_
 {
 	struct saved_alias *al;
 
-	if (slab_state == SYSFS)
-		return sysfs_create_link(&slab_subsys.kset.kobj,
+	if (slab_state == SYSFS) {
+		int rc;
+
+		/*
+		 * Aliases are there mainly for decorative purposes
+		 * and we have no way of removing them properly.
+		 * Creating a link may fail due to the symlink remaining.
+		 * f.e. module unloading and loading.
+		 */
+		rc = sysfs_create_link(&slab_subsys.kset.kobj,
 						&s->kobj, name);
+		return 0;
+	}
 
 	al = kmalloc(sizeof(struct saved_alias), GFP_KERNEL);
 	if (!al)

  reply	other threads:[~2007-04-20  5:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20  4:28 Neil Brown
2007-04-20  5:18 ` Christoph Lameter [this message]
2007-04-20  5:35   ` Neil Brown
2007-04-20  5:38     ` Christoph Lameter
2007-04-20  5:51       ` Christoph Lameter
2007-04-23  6:44       ` Neil Brown
2007-04-23  6:48         ` Christoph Lameter
2007-04-23 20:49         ` Christoph Lameter
2007-04-24  0:34           ` Neil Brown
2007-04-24  0:42             ` Christoph Lameter
2007-04-24  0:50               ` Neil Brown
2007-04-24  1:06                 ` Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0704192215420.16306@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®