linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext3: Wrong return value for EXT3_IOC_GROUP_ADD
@ 2005-11-25 19:10 Glauber de Oliveira Costa
  0 siblings, 0 replies; only message in thread
From: Glauber de Oliveira Costa @ 2005-11-25 19:10 UTC (permalink / raw)
  To: ext2-devel, linux-kernel, linux-fsdevel, adilger, akpm, viro

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

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.

Signed-off-by: Glauber de Oliveira Costa <glommer@br.ibm.com> 




[-- Attachment #2: patch-resize-return-value --]
[-- Type: text/plain, Size: 403 bytes --]

--- linux-2.6.14.2-orig/fs/ext3/resize.c	2005-11-25 15:47:41.000000000 +0000
+++ linux-2.6.14.2-orig/fs/ext3/resize-ret.c	2005-11-25 15:49:20.000000000 +0000
@@ -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;
 	}
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-25 19:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-25 19:10 [PATCH] ext3: Wrong return value for EXT3_IOC_GROUP_ADD Glauber de Oliveira Costa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).