Jan Capek
2006-May-26 10:08 UTC
[PATCH - 2.6.17-rc5] ext3: Fix missed mutex unlock - unroll
Hi, I believe the following patch in the GIT - 2.6.17-rc5 is not correct: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=75616cf9854b83eb83a968b1338ae0ee11c9673c It is the second of the two patches contributed by Leonid Ananiev. This one incorrectly adds the super block unlocking in the error path, though. As we can see in the function ext3_group_add() the unlock is already handled at the label 'exit_journal' for all error paths. Below is the patch that should be unrolled. Thanks, Jan Jan Capek SYSGO | Real-Time Solutions | ELinOS Embedded Linux | http://www.sysgo.com ---- From: Ananiev, Leonid I <leonid.i.ananiev at intel.com> Date: Tue, 11 Apr 2006 05:54:38 +0000 (-0700) Subject: [PATCH] ext3: Fix missed mutex unlock X-Git-Tag: v2.6.17-rc2 X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=75616cf9854b83eb83a968b1338ae0ee11c9673c [PATCH] ext3: Fix missed mutex unlock Missed unlock_super()call is added in error condition code path. Signed-off-by: Leonid Ananiev <leonid.i.ananiev at intel.com> Signed-off-by: Andrew Morton <akpm at osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de> --- --- a/fs/ext3/resize.c +++ b/fs/ext3/resize.c @@ -767,6 +767,7 @@ int ext3_group_add(struct super_block *s if (input->group != sbi->s_groups_count) { ext3_warning(sb, __FUNCTION__, "multiple resizers run on filesystem!"); + unlock_super(sb); err = -EBUSY; goto exit_journal; }
Ananiev, Leonid I
2006-May-26 11:11 UTC
[PATCH - 2.6.17-rc5] ext3: Fix missed mutex unlock - unroll
Hi, Jan Capek writes> It is the second of the two patches contributed by Leonid Ananiev.I've sent one but not two patches according to "ext3: Fix missed mutex unlock". Here is my patch: http://marc.theaimsgroup.com/?l=linux-kernel&m=114469290908779&w=2 --- fs/ext3/resize.c? 2006-04-06 01:08:28.367109040 -0700 +++ fs/ext3/resize.c?????? 2006-04-06 01:10:37.289509856 -0700 @@ -974,6 +974,7 @@ int ext3_group_extend(struct super_block ??????? if (o_blocks_count != le32_to_cpu(es->s_blocks_count)) { ??????????????? ext3_warning(sb, __FUNCTION__, ???????????? ????????????????"multiple resizers run on filesystem!"); +?????????????? unlock_super(sb); ??????????????? err = -EBUSY; ??????????????? goto exit_put; ??????? } This patch was applied to line 974 only but not to line 767 as described in attached mail. The patch for line 767 is contributed by Greg Kroah-Hartman and not signed by my as pointed in http://marc.theaimsgroup.com/?l=linux-kernel&m=114530988809825&w=2 Thanks, Leonid -----Original Message----- From: Jan Capek [mailto:jca at sysgo.com] Sent: Friday, May 26, 2006 2:09 PM To: sct at redhat.com; akpm at osdl.org; adilger at clusterfs.com Cc: ext3-users at redhat.com; Ananiev, Leonid I Subject: [PATCH - 2.6.17-rc5] ext3: Fix missed mutex unlock - unroll Hi, I believe the following patch in the GIT - 2.6.17-rc5 is not correct: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=75616cf9854b83eb83a968b1338ae0ee11c9673c It is the second of the two patches contributed by Leonid Ananiev. This one incorrectly adds the super block unlocking in the error path, though. As we can see in the function ext3_group_add() the unlock is already handled at the label 'exit_journal' for all error paths. Below is the patch that should be unrolled. Thanks, Jan Jan Capek SYSGO | Real-Time Solutions | ELinOS Embedded Linux | http://www.sysgo.com ---- From: Ananiev, Leonid I <leonid.i.ananiev at intel.com> Date: Tue, 11 Apr 2006 05:54:38 +0000 (-0700) Subject: [PATCH] ext3: Fix missed mutex unlock X-Git-Tag: v2.6.17-rc2 X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=75616cf9854b83eb83a968b1338ae0ee11c9673c [PATCH] ext3: Fix missed mutex unlock Missed unlock_super()call is added in error condition code path. Signed-off-by: Leonid Ananiev <leonid.i.ananiev at intel.com> Signed-off-by: Andrew Morton <akpm at osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de> --- --- a/fs/ext3/resize.c +++ b/fs/ext3/resize.c @@ -767,6 +767,7 @@ int ext3_group_add(struct super_block *s if (input->group != sbi->s_groups_count) { ext3_warning(sb, __FUNCTION__, "multiple resizers run on filesystem!"); + unlock_super(sb); err = -EBUSY; goto exit_journal; }