]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix a race which could leak memory in ext4_groupinfo_create_slab()
authorTao Ma <boyu.mt@taobao.com>
Mon, 11 Jul 2011 22:26:01 +0000 (18:26 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 11 Jul 2011 22:26:01 +0000 (18:26 -0400)
commit217c9df94697e711a5ec77089d3b6283c1efe461
treec84853512445f6f56aeb0fcf8f9207222e9c80c0
parent6a55f4321df013e1c85d25673f72f4949ba9da6c
ext4: fix a race which could leak memory in ext4_groupinfo_create_slab()

In ext4_groupinfo_create_slab, we create ext4_groupinfo_caches within
ext4_grpinfo_slab_create_mutex, but set it outside the lock, and there
does exist some case that we may create it twice and causes a memory
leak.  So set it before we call mutex_unlock.

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/mballoc.c