Re: [PATCH] ext4: make grpinfo slab cache names static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux