From: Greg Kroah-Hartman Date: Tue, 20 Sep 2016 12:13:21 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.4.22~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abafa7db946099a282306709ba48905ea795169d;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: lightnvm-put-bio-before-return.patch --- diff --git a/queue-4.4/lightnvm-put-bio-before-return.patch b/queue-4.4/lightnvm-put-bio-before-return.patch new file mode 100644 index 00000000000..d7293146ee7 --- /dev/null +++ b/queue-4.4/lightnvm-put-bio-before-return.patch @@ -0,0 +1,38 @@ +From 16c6d048d7b74249a4387700887e8adb13028866 Mon Sep 17 00:00:00 2001 +From: Wenwei Tao +Date: Thu, 4 Feb 2016 15:13:23 +0100 +Subject: lightnvm: put bio before return +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Wenwei Tao + +commit 16c6d048d7b74249a4387700887e8adb13028866 upstream. + +The bio is not returned if the data page cannot be allocated. + +Signed-off-by: Wenwei Tao +Signed-off-by: Matias Bjørling +Signed-off-by: Jens Axboe +Cc: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/lightnvm/rrpc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/lightnvm/rrpc.c ++++ b/drivers/lightnvm/rrpc.c +@@ -287,8 +287,10 @@ static int rrpc_move_valid_pages(struct + } + + page = mempool_alloc(rrpc->page_pool, GFP_NOIO); +- if (!page) ++ if (!page) { ++ bio_put(bio); + return -ENOMEM; ++ } + + while ((slot = find_first_zero_bit(rblk->invalid_pages, + nr_pgs_per_blk)) < nr_pgs_per_blk) { diff --git a/queue-4.4/series b/queue-4.4/series index 85d3123b341..46743f3e17d 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -4,3 +4,4 @@ clocksource-drivers-sun4i-clear-interrupts-after-stopping-timer-in-probe-functio mips-kvm-check-for-pfn-noslot-case.patch revert-kvm-x86-fix-missed-hardware-breakpoints.patch fscrypto-require-write-access-to-mount-to-set-encryption-policy.patch +lightnvm-put-bio-before-return.patch