stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "xfs: Fix leak of discard bio" has been added to the 4.12-stable tree
@ 2017-08-13 22:19 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-08-13 22:19 UTC (permalink / raw)
  To: jack, darrick.wong, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    xfs: Fix leak of discard bio

to the 4.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xfs-fix-leak-of-discard-bio.patch
and it can be found in the queue-4.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From ea7bd56fa309d10a41b1041827a63c0746c47554 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Wed, 2 Aug 2017 12:37:16 -0700
Subject: xfs: Fix leak of discard bio

From: Jan Kara <jack@suse.cz>

commit ea7bd56fa309d10a41b1041827a63c0746c47554 upstream.

The bio describing discard operation is allocated by
__blkdev_issue_discard() which returns us a reference to it. That
reference is never released and thus we leak this bio. Drop the bio
reference once it completes in xlog_discard_endio().

Fixes: 4560e78f40cb55bd2ea8f1ef4001c5baa88531c7
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/xfs/xfs_log_cil.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/xfs/xfs_log_cil.c
+++ b/fs/xfs/xfs_log_cil.c
@@ -519,6 +519,7 @@ xlog_discard_endio(
 
 	INIT_WORK(&ctx->discard_endio_work, xlog_discard_endio_work);
 	queue_work(xfs_discard_wq, &ctx->discard_endio_work);
+	bio_put(bio);
 }
 
 static void


Patches currently in stable-queue which might be from jack@suse.cz are

queue-4.12/xfs-fix-leak-of-discard-bio.patch

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

only message in thread, other threads:[~2017-08-14  0:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-13 22:19 Patch "xfs: Fix leak of discard bio" has been added to the 4.12-stable tree gregkh

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).