Skip to contentSkip to conversation

ext3: Wrong return value for EXT3_IOC_GROUP_ADD

PATCH New Glauber de Oliveira Costa 1 participant 1 message Nov 25, 2005 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext3: Wrong return value for EXT3_IOC_GROUP_ADD

This patch corrects the return value for the EXT3_IOC_GROUP_ADD in case it fails due to the presence of multiple resizers at the filesystem.

The problem is a little bit more serious than a wrong return value in this case, since the clause err=0 in the exit_journal path will lead to a call to update_backups which in turns causes a NULL pointer dereference.

fs/ext3/resize-ret.c renamed from fs/ext3/resize.c +1 -0
@@ -757,6 +757,7 @@ int ext3_group_add(struct super_block *s
 	if (input->group != EXT3_SB(sb)->s_groups_count) {
 		ext3_warning(sb, __FUNCTION__,
 			     "multiple resizers run on filesystem!\n");
+		err = -EBUSY;
 		goto exit_journal;
 	}