]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 07:52:29 +0000 (08:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 07:52:29 +0000 (08:52 +0100)
added patches:
blk-mq-make-sure-that-line-break-can-be-printed.patch
workqueue-fix-missing-kfree-rescuer-in-destroy_workqueue.patch

queue-4.9/blk-mq-make-sure-that-line-break-can-be-printed.patch [new file with mode: 0644]
queue-4.9/series
queue-4.9/workqueue-fix-missing-kfree-rescuer-in-destroy_workqueue.patch [new file with mode: 0644]

diff --git a/queue-4.9/blk-mq-make-sure-that-line-break-can-be-printed.patch b/queue-4.9/blk-mq-make-sure-that-line-break-can-be-printed.patch
new file mode 100644 (file)
index 0000000..23e38f0
--- /dev/null
@@ -0,0 +1,35 @@
+From d2c9be89f8ebe7ebcc97676ac40f8dec1cf9b43a Mon Sep 17 00:00:00 2001
+From: Ming Lei <ming.lei@redhat.com>
+Date: Mon, 4 Nov 2019 16:26:53 +0800
+Subject: blk-mq: make sure that line break can be printed
+
+From: Ming Lei <ming.lei@redhat.com>
+
+commit d2c9be89f8ebe7ebcc97676ac40f8dec1cf9b43a upstream.
+
+8962842ca5ab ("blk-mq: avoid sysfs buffer overflow with too many CPU cores")
+avoids sysfs buffer overflow, and reserves one character for line break.
+However, the last snprintf() doesn't get correct 'size' parameter passed
+in, so fixed it.
+
+Fixes: 8962842ca5ab ("blk-mq: avoid sysfs buffer overflow with too many CPU cores")
+Signed-off-by: Ming Lei <ming.lei@redhat.com>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ block/blk-mq-sysfs.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/block/blk-mq-sysfs.c
++++ b/block/blk-mq-sysfs.c
+@@ -260,7 +260,7 @@ static ssize_t blk_mq_hw_sysfs_cpus_show
+               pos += ret;
+       }
+-      ret = snprintf(pos + page, size - pos, "\n");
++      ret = snprintf(pos + page, size + 1 - pos, "\n");
+       return pos + ret;
+ }
index 80261ca0b8d8904440ac2a041ff4cfec542a1792..6bf34258604ebad24f2218ac6c078b725463ede8 100644 (file)
@@ -167,3 +167,5 @@ reiserfs-fix-extended-attributes-on-the-root-directo.patch
 firmware-qcom-scm-ensure-a0-status-code-is-treated-as-signed.patch
 mm-shmem.c-cast-the-type-of-unmap_start-to-u64.patch
 ext4-fix-a-bug-in-ext4_wait_for_tail_page_commit.patch
+blk-mq-make-sure-that-line-break-can-be-printed.patch
+workqueue-fix-missing-kfree-rescuer-in-destroy_workqueue.patch
diff --git a/queue-4.9/workqueue-fix-missing-kfree-rescuer-in-destroy_workqueue.patch b/queue-4.9/workqueue-fix-missing-kfree-rescuer-in-destroy_workqueue.patch
new file mode 100644 (file)
index 0000000..06a9777
--- /dev/null
@@ -0,0 +1,29 @@
+From 8efe1223d73c218ce7e8b2e0e9aadb974b582d7f Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj@kernel.org>
+Date: Fri, 20 Sep 2019 13:39:57 -0700
+Subject: workqueue: Fix missing kfree(rescuer) in destroy_workqueue()
+
+From: Tejun Heo <tj@kernel.org>
+
+commit 8efe1223d73c218ce7e8b2e0e9aadb974b582d7f upstream.
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Reported-by: Qian Cai <cai@lca.pw>
+Fixes: def98c84b6cd ("workqueue: Fix spurious sanity check failures in destroy_workqueue()")
+Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/workqueue.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/kernel/workqueue.c
++++ b/kernel/workqueue.c
+@@ -4057,6 +4057,7 @@ void destroy_workqueue(struct workqueue_
+               /* rescuer will empty maydays list before exiting */
+               kthread_stop(rescuer->task);
++              kfree(rescuer);
+       }
+       /* sanity checks */