From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [patch for 2.6.29? 3/3] vfs: add missing unlock in sget() Date: Thu, 05 Mar 2009 09:58:43 +0800 Message-ID: <49AF31D3.7060109@cn.fujitsu.com> References: <200903042012.n24KCWhC030028@imap1.linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, a.p.zijlstra@chello.nl, menage@google.com To: akpm@linux-foundation.org Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:58815 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751215AbZCEB6s (ORCPT ); Wed, 4 Mar 2009 20:58:48 -0500 In-Reply-To: <200903042012.n24KCWhC030028@imap1.linux-foundation.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: akpm@linux-foundation.org wrote: > From: Li Zefan > > In sget(), destroy_super(s) is called with s->s_umount held, which makes > lockdep unhappy. > > Signed-off-by: Li Zefan > Cc: Al Viro > Acked-by: Peter Zijlstra > Cc: Paul Menage > Signed-off-by: Andrew Morton > --- I think it's for 2.6.29, otherwise I can hit a warning with mainline kernel using the test program which is designed to test cgroups: ========================= [ BUG: held lock freed! ] ------------------------- mount/13413 is freeing memory e767a800-e767abff, with a lock still held there! (&type->s_umount_key#29/1){--..}, at: [] sget+0x1ea/0x324 2 locks held by mount/13413: #0: (&type->s_umount_key#29/1){--..}, at: [] sget+0x1ea/0x324 #1: (&type->s_umount_key#30){--..}, at: [] sget+0x58/0x324 stack backtrace: Pid: 13413, comm: mount Not tainted 2.6.29-rc4 #548 Call Trace: [] debug_check_no_locks_freed+0xc9/0x105 [] kfree+0x82/0xd1 [] ? sget+0x2c6/0x324 [] sget+0x2c6/0x324 [] ? cgroup_set_super+0x0/0x3e [] ? cgroup_test_super+0x0/0x2f [] cgroup_get_sb+0x8d/0x284 [] ? kstrdup+0x31/0x53 [] vfs_kern_mount+0x40/0x7b [] do_kern_mount+0x37/0xbf [] do_mount+0x5c4/0x61b [] ? copy_mount_options+0x2c/0x111 [] sys_mount+0x69/0xa0 [] sysenter_do_call+0x12/0x31