public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* bugreport
@ 2004-07-27 13:08 Artem B. Bityuckiy
  2004-07-27 13:22 ` bugreport Thomas Gleixner
  0 siblings, 1 reply; 7+ messages in thread
From: Artem B. Bityuckiy @ 2004-07-27 13:08 UTC (permalink / raw)
  To: linux-mtd

Hello.

There is a bug in jffs2 module registration function - super.c line 293:
the init_jffs2_fs function doesn't properly perform
the de-initialization in case of failures on lines 315 and 321.
The jffs2_inode_cachep is also not feed.

I Tried to send a patch bit mailman soesn't gieve me...

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* bugreport
@ 2004-07-26 11:16 Artem Bityuckiy
  0 siblings, 0 replies; 7+ messages in thread
From: Artem Bityuckiy @ 2004-07-26 11:16 UTC (permalink / raw)
  To: linux-mtd

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

Hello.

There is a bug in jffs2 module registration function - super.c line 293: 
the init_jffs2_fs function doesn't properly perform
the de-initialization in case of failures on lines 315 and 321.

The jffs2_inode_cachep is also not feed.

The proposed patch is attached.

Note 1: I didn't test this patch and didn't even compile JFFS2 with it - 
*be careful*.

Note 2: The similar ought to be fixed in super-v24.c

Artem.

-- 
Best regards, Artem B. Bityuckiy
Oktet Labs (St. Petersburg), Software Engineer.
+78124286709 (office) +79112449030 (mobile)
E-mail: dedekind@oktetlabs.ru, web: http://www.oktetlabs.ru

[-- Attachment #2: super.c.diff --]
[-- Type: text/plain, Size: 592 bytes --]

--- super.c	2004-07-18 18:44:42.000000000 +0400
+++ /home/dedekind/tmp/super_fixed.c	2004-07-26 15:05:34.000000000 +0400
@@ -318,7 +318,7 @@
 	ret = jffs2_compressors_init();
 	if (ret) {
 		printk(KERN_ERR "JFFS2 error: Failed to initialise compressors\n");
-		goto out;
+		goto out_proc;
 	}
 	ret = jffs2_create_slab_caches();
 	if (ret) {
@@ -336,10 +336,12 @@
 	jffs2_destroy_slab_caches();
  out_compressors:
 	jffs2_compressors_exit();
+ out_proc:
 #ifdef CONFIG_JFFS2_PROC
         jffs2_proc_exit();
 #endif
  out:
+        kmem_cache_destroy(jffs2_inode_cachep);
 	return ret;
 }
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-07-29 19:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-27 13:08 bugreport Artem B. Bityuckiy
2004-07-27 13:22 ` bugreport Thomas Gleixner
2004-07-27 14:40   ` bugreport Artem B. Bityuckiy
2004-07-27 17:31     ` bugreport Thomas Gleixner
2004-07-28  6:41       ` bugreport Artem B. Bityuckiy
2004-07-29 19:56         ` bugreport David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2004-07-26 11:16 bugreport Artem Bityuckiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox