[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140504154042.713093204@linuxfoundation.org>
Date: Sun, 4 May 2014 11:40:03 -0400
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Sagi Grimberg <sagig@...lanox.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
Quinn Tran <quinn.tran@...gic.com>,
Giridhar Malavali <giridhar.malavali@...gic.com>,
Nicholas Bellinger <nab@...ux-iscsi.org>
Subject: [PATCH 3.14 094/158] target/iblock: Fix double bioset_integrity_free bug
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicholas Bellinger <nab@...ux-iscsi.org>
commit d84287bcfe624697cd4f3c1df746beb53b86d9c4 upstream.
This patch fixes a double free bug during IBLOCK backend shutdown
where bioset_integrity_free() was incorrectly called ahead of
bioset_free(), who is already making the same call directly.
This bug was introduced with commit ecebbf6cc, and will end up
triggering a general protection fault in iblock_free_device()
Reviewed-by: Sagi Grimberg <sagig@...lanox.com>
Cc: Martin K. Petersen <martin.petersen@...cle.com>
Cc: Or Gerlitz <ogerlitz@...lanox.com>
Cc: Quinn Tran <quinn.tran@...gic.com>
Cc: Giridhar Malavali <giridhar.malavali@...gic.com>
Signed-off-by: Nicholas Bellinger <nab@...ux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/target/target_core_iblock.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -203,10 +203,9 @@ static void iblock_free_device(struct se
if (ib_dev->ibd_bd != NULL)
blkdev_put(ib_dev->ibd_bd, FMODE_WRITE|FMODE_READ|FMODE_EXCL);
- if (ib_dev->ibd_bio_set != NULL) {
- bioset_integrity_free(ib_dev->ibd_bio_set);
+ if (ib_dev->ibd_bio_set != NULL)
bioset_free(ib_dev->ibd_bio_set);
- }
+
kfree(ib_dev);
}
--
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