]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Apr 2022 13:17:11 +0000 (15:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Apr 2022 13:17:11 +0000 (15:17 +0200)
added patches:
pinctrl-pinconf-generic-print-arguments-for-bias-pull.patch
watch_queue-free-the-page-array-when-watch_queue-is-dismantled.patch

queue-5.15/pinctrl-pinconf-generic-print-arguments-for-bias-pull.patch [new file with mode: 0644]
queue-5.15/series
queue-5.15/watch_queue-free-the-page-array-when-watch_queue-is-dismantled.patch [new file with mode: 0644]

diff --git a/queue-5.15/pinctrl-pinconf-generic-print-arguments-for-bias-pull.patch b/queue-5.15/pinctrl-pinconf-generic-print-arguments-for-bias-pull.patch
new file mode 100644 (file)
index 0000000..dab51a8
--- /dev/null
@@ -0,0 +1,42 @@
+From 188e5834b930acd03ad3cf7c5e7aa24db9665a29 Mon Sep 17 00:00:00 2001
+From: Chen-Yu Tsai <wenst@chromium.org>
+Date: Tue, 8 Mar 2022 18:09:46 +0800
+Subject: pinctrl: pinconf-generic: Print arguments for bias-pull-*
+
+From: Chen-Yu Tsai <wenst@chromium.org>
+
+commit 188e5834b930acd03ad3cf7c5e7aa24db9665a29 upstream.
+
+The bias-pull-* properties, or PIN_CONFIG_BIAS_PULL_* pin config
+parameters, accept optional arguments in ohms denoting the strength of
+the pin bias.
+
+Print these values out in debugfs as well.
+
+Fixes: eec450713e5c ("pinctrl: pinconf-generic: Add flag to print arguments")
+Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
+Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
+Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
+Link: https://lore.kernel.org/r/20220308100956.2750295-2-wenst@chromium.org
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pinctrl/pinconf-generic.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/pinctrl/pinconf-generic.c
++++ b/drivers/pinctrl/pinconf-generic.c
+@@ -30,10 +30,10 @@ static const struct pin_config_item conf
+       PCONFDUMP(PIN_CONFIG_BIAS_BUS_HOLD, "input bias bus hold", NULL, false),
+       PCONFDUMP(PIN_CONFIG_BIAS_DISABLE, "input bias disabled", NULL, false),
+       PCONFDUMP(PIN_CONFIG_BIAS_HIGH_IMPEDANCE, "input bias high impedance", NULL, false),
+-      PCONFDUMP(PIN_CONFIG_BIAS_PULL_DOWN, "input bias pull down", NULL, false),
++      PCONFDUMP(PIN_CONFIG_BIAS_PULL_DOWN, "input bias pull down", "ohms", true),
+       PCONFDUMP(PIN_CONFIG_BIAS_PULL_PIN_DEFAULT,
+-                              "input bias pull to pin specific state", NULL, false),
+-      PCONFDUMP(PIN_CONFIG_BIAS_PULL_UP, "input bias pull up", NULL, false),
++                              "input bias pull to pin specific state", "ohms", true),
++      PCONFDUMP(PIN_CONFIG_BIAS_PULL_UP, "input bias pull up", "ohms", true),
+       PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_DRAIN, "output drive open drain", NULL, false),
+       PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_SOURCE, "output drive open source", NULL, false),
+       PCONFDUMP(PIN_CONFIG_DRIVE_PUSH_PULL, "output drive push pull", NULL, false),
index b6c271207e2012f8668affba0da4e92c038ad0f1..577739e0878e49db06d3f3ab699a0ca60231f776 100644 (file)
@@ -844,3 +844,5 @@ rxrpc-fix-some-null-ptr-deref-bugs-in-server_key.c.patch
 rxrpc-fix-call-timer-start-racing-with-call-destruction.patch
 mailbox-imx-fix-wakeup-failure-from-freeze-mode.patch
 crypto-arm-aes-neonbs-cbc-select-generic-cbc-and-aes.patch
+watch_queue-free-the-page-array-when-watch_queue-is-dismantled.patch
+pinctrl-pinconf-generic-print-arguments-for-bias-pull.patch
diff --git a/queue-5.15/watch_queue-free-the-page-array-when-watch_queue-is-dismantled.patch b/queue-5.15/watch_queue-free-the-page-array-when-watch_queue-is-dismantled.patch
new file mode 100644 (file)
index 0000000..8c41098
--- /dev/null
@@ -0,0 +1,52 @@
+From b490207017ba237d97b735b2aa66dc241ccd18f5 Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <edumazet@google.com>
+Date: Mon, 28 Mar 2022 18:07:04 +0100
+Subject: watch_queue: Free the page array when watch_queue is dismantled
+
+From: Eric Dumazet <edumazet@google.com>
+
+commit b490207017ba237d97b735b2aa66dc241ccd18f5 upstream.
+
+Commit 7ea1a0124b6d ("watch_queue: Free the alloc bitmap when the
+watch_queue is torn down") took care of the bitmap, but not the page
+array.
+
+  BUG: memory leak
+  unreferenced object 0xffff88810d9bc140 (size 32):
+  comm "syz-executor335", pid 3603, jiffies 4294946994 (age 12.840s)
+  hex dump (first 32 bytes):
+    40 a7 40 04 00 ea ff ff 00 00 00 00 00 00 00 00  @.@.............
+    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
+  backtrace:
+     kmalloc_array include/linux/slab.h:621 [inline]
+     kcalloc include/linux/slab.h:652 [inline]
+     watch_queue_set_size+0x12f/0x2e0 kernel/watch_queue.c:251
+     pipe_ioctl+0x82/0x140 fs/pipe.c:632
+     vfs_ioctl fs/ioctl.c:51 [inline]
+     __do_sys_ioctl fs/ioctl.c:874 [inline]
+     __se_sys_ioctl fs/ioctl.c:860 [inline]
+     __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:860
+     do_syscall_x64 arch/x86/entry/common.c:50 [inline]
+
+Reported-by: syzbot+25ea042ae28f3888727a@syzkaller.appspotmail.com
+Fixes: c73be61cede5 ("pipe: Add general notification queue support")
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Signed-off-by: David Howells <dhowells@redhat.com>
+Cc: Jann Horn <jannh@google.com>
+Link: https://lore.kernel.org/r/20220322004654.618274-1-eric.dumazet@gmail.com/
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/watch_queue.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/kernel/watch_queue.c
++++ b/kernel/watch_queue.c
+@@ -373,6 +373,7 @@ static void __put_watch_queue(struct kre
+       for (i = 0; i < wqueue->nr_pages; i++)
+               __free_page(wqueue->notes[i]);
++      kfree(wqueue->notes);
+       bitmap_free(wqueue->notes_bitmap);
+       wfilter = rcu_access_pointer(wqueue->filter);