[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20100320112448.GX5331@bicker>
Date: Sat, 20 Mar 2010 14:24:48 +0300
From: Dan Carpenter <error27@...il.com>
To: Chris Mason <chris.mason@...cle.com>
Cc: Yan Zheng <zheng.yan@...cle.com>, Josef Bacik <josef@...hat.com>,
Sage Weil <sage@...dream.net>,
Al Viro <viro@...iv.linux.org.uk>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch 3/3] btrfs: dereferencing freed memory
The original code dereferenced range on the next line.
Signed-off-by: Dan Carpenter <error27@...il.com>
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index be9b5df..d7ab56c 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1378,6 +1378,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
sizeof(*range))) {
ret = -EFAULT;
kfree(range);
+ goto out;
}
/* compression requires us to start the IO */
if ((range->flags & BTRFS_DEFRAG_RANGE_COMPRESS)) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists