All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reiser4: fix a use after free bug in reiser4_parse_options
@ 2004-11-17 23:09 Laurent Riffard
  0 siblings, 0 replies; only message in thread
From: Laurent Riffard @ 2004-11-17 23:09 UTC (permalink / raw)
  To: reiserfs-list

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

This patch fix a "use after kfree" bug in reiser4_parse_options.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
---

diff -u linux-2.6-orig/fs/reiser4/vfs_ops.c linux-2.6/fs/reiser4/vfs_ops.c
--- linux-2.6-orig/fs/reiser4/vfs_ops.c	2004-11-17 23:43:22.186242952 +0100
+++ linux-2.6/fs/reiser4/vfs_ops.c	2004-11-17 23:39:15.935678728 +0100
@@ -1060,8 +1060,6 @@
 	});
 #endif
 
-	kfree(opts);
-
 	sbinfo->tmgr.atom_max_size = txnmgr_get_max_atom_size(s);
 	sbinfo->tmgr.atom_max_age = REISER4_ATOM_MAX_AGE / HZ;
 	sbinfo->tmgr.atom_max_flushers = ATOM_MAX_FLUSHERS;
@@ -1089,6 +1087,9 @@
 	sbinfo->ra_params.flags = 0;
 
 	result = parse_options(opt_string, opts, p - opts);
+
+	kfree(opts);
+
 	if (result != 0)
 		return result;
 

-- 
laurent


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

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

only message in thread, other threads:[~2004-11-17 23:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-17 23:09 [PATCH] reiser4: fix a use after free bug in reiser4_parse_options Laurent Riffard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.