]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Oct 2017 13:08:48 +0000 (15:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Oct 2017 13:08:48 +0000 (15:08 +0200)
added patches:
revert-bsg-lib-don-t-free-job-in-bsg_prepare_job.patch

queue-4.4/revert-bsg-lib-don-t-free-job-in-bsg_prepare_job.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/revert-bsg-lib-don-t-free-job-in-bsg_prepare_job.patch b/queue-4.4/revert-bsg-lib-don-t-free-job-in-bsg_prepare_job.patch
new file mode 100644 (file)
index 0000000..c68bf27
--- /dev/null
@@ -0,0 +1,35 @@
+From 42fbb07e2e3a338154ee747bf28dc688bc599b81 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Thu, 19 Oct 2017 14:55:29 +0200
+Subject: [PATCH] Revert "bsg-lib: don't free job in bsg_prepare_job"
+
+This reverts commit 668cee82cd28d2c38a99f7cbddf3b3fd58f257b9 which was
+commit f507b54dccfd8000c517d740bc45f20c74532d18 upstream.
+
+Ben reports:
+       That function doesn't exist here (it was introduced in 4.13).
+       Instead, this backport has modified bsg_create_job(), creating a
+       leak.  Please revert this on the 3.18, 4.4 and 4.9 stable
+       branches.
+
+So I'm dropping it from here.
+
+Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
+Cc: Christoph Hellwig <hch@lst.de>
+Cc: Ming Lei <ming.lei@redhat.com>
+Cc: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
+---
+ block/bsg-lib.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/block/bsg-lib.c
++++ b/block/bsg-lib.c
+@@ -147,6 +147,7 @@ static int bsg_create_job(struct device
+ failjob_rls_rqst_payload:
+       kfree(job->request_payload.sg_list);
+ failjob_rls_job:
++      kfree(job);
+       return -ENOMEM;
+ }
index 6ac8130a92dc842a658b22764622e510816d3d7c..673521c31361a3210a3f792f66457de4781907ba 100644 (file)
@@ -17,3 +17,4 @@ packet-in-packet_do_bind-test-fanout-with-bind_lock-held.patch
 packet-only-test-po-has_vnet_hdr-once-in-packet_snd.patch
 net-set-sk_prot_creator-when-cloning-sockets-to-the-right-proto.patch
 tipc-use-only-positive-error-codes-in-messages.patch
+revert-bsg-lib-don-t-free-job-in-bsg_prepare_job.patch