]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 07:53:00 +0000 (08:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 07:53:00 +0000 (08:53 +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.19/blk-mq-make-sure-that-line-break-can-be-printed.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/workqueue-fix-missing-kfree-rescuer-in-destroy_workqueue.patch [new file with mode: 0644]

diff --git a/queue-4.19/blk-mq-make-sure-that-line-break-can-be-printed.patch b/queue-4.19/blk-mq-make-sure-that-line-break-can-be-printed.patch
new file mode 100644 (file)
index 0000000..32bd978
--- /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
+@@ -168,7 +168,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 85576247dce34c0759866d90f6e98457cc270f0e..ac60d9bae3469ae3b1c480246a84efa4d159c7ed 100644 (file)
@@ -137,3 +137,5 @@ ext4-fix-a-bug-in-ext4_wait_for_tail_page_commit.patch
 mfd-rk808-fix-rk818-id-template.patch
 mm-thp-proc-report-thp-eligibility-for-each-vma.patch
 s390-smp-vdso-fix-asce-handling.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.19/workqueue-fix-missing-kfree-rescuer-in-destroy_workqueue.patch b/queue-4.19/workqueue-fix-missing-kfree-rescuer-in-destroy_workqueue.patch
new file mode 100644 (file)
index 0000000..115a1a9
--- /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
+@@ -4180,6 +4180,7 @@ void destroy_workqueue(struct workqueue_
+               /* rescuer will empty maydays list before exiting */
+               kthread_stop(rescuer->task);
++              kfree(rescuer);
+       }
+       /* sanity checks */