]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Sep 2016 12:13:21 +0000 (14:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Sep 2016 12:13:21 +0000 (14:13 +0200)
added patches:
lightnvm-put-bio-before-return.patch

queue-4.4/lightnvm-put-bio-before-return.patch [new file with mode: 0644]
queue-4.4/series

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 (file)
index 0000000..d729314
--- /dev/null
@@ -0,0 +1,38 @@
+From 16c6d048d7b74249a4387700887e8adb13028866 Mon Sep 17 00:00:00 2001
+From: Wenwei Tao <ww.tao0320@gmail.com>
+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 <ww.tao0320@gmail.com>
+
+commit 16c6d048d7b74249a4387700887e8adb13028866 upstream.
+
+The bio is not returned if the data page cannot be allocated.
+
+Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
+Signed-off-by: Matias Bjørling <m@bjorling.me>
+Signed-off-by: Jens Axboe <axboe@fb.com>
+Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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) {
index 85d3123b341d986ed6c19cb7158c60f664bd1340..46743f3e17d8850f002eeac8076b4c57fc3fec73 100644 (file)
@@ -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