All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] ext4: make grpinfo slab cache names static
Date: Fri, 4 Feb 2011 00:17:28 -0500	[thread overview]
Message-ID: <20110204051728.GC2623@thunk.org> (raw)
In-Reply-To: <4D374CB9.6050508@redhat.com>

Thanks, added to the ext4 patch queue.

-- Ted


On Wed, Jan 19, 2011 at 02:42:33PM -0600, Eric Sandeen wrote:
> In 2.6.37 I was running into oopses with repeated module
> loads & unloads.  I tracked this down to:
> 
> fb1813f4 ext4: use dedicated slab caches for group_info structures
> 
> (this was in addition to the features advert unload problem)
> 
> The kstrdup & subsequent kfree of the cache name was causing
> a double free.  In slub, at least, if I read it right it allocates
> & frees the name itself, slab seems to do something different...
> so in slub I think we were leaking -our- cachep->name, and double
> freeing the one allocated by slub.
> 
> After getting lost in slab/slub/slob a bit, I just looked at other
> sized-caches that get allocated.  jbd2, biovec, sgpool all do it
> more or less the way jbd2 does.  Below patch follows the jbd2
> method of dynamically allocating a cache at mount time from
> a list of static names.
> 
> (This might also possibly fix a race creating the caches with
> parallel mounts running).
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

      reply	other threads:[~2011-02-04  5:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 20:42 [PATCH] ext4: make grpinfo slab cache names static Eric Sandeen
2011-02-04  5:17 ` Ted Ts'o [this message]

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=20110204051728.GC2623@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.