From: Greg Kroah-Hartman Date: Mon, 20 Jul 2020 11:49:55 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.4.231~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=861cd889cb87e04246c988b8962ffb43269900ef;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: ovl-fix-regression-with-re-formatted-lower-squashfs.patch serial-mxs-auart-add-missed-iounmap-in-probe-failure-and-remove.patch virtio-virtio_console-add-missing-module_device_table-for-rproc-serial.patch --- diff --git a/queue-5.4/ovl-fix-regression-with-re-formatted-lower-squashfs.patch b/queue-5.4/ovl-fix-regression-with-re-formatted-lower-squashfs.patch new file mode 100644 index 00000000000..c21cb23a900 --- /dev/null +++ b/queue-5.4/ovl-fix-regression-with-re-formatted-lower-squashfs.patch @@ -0,0 +1,57 @@ +From a888db310195400f050b89c47673f0f8babfbb41 Mon Sep 17 00:00:00 2001 +From: Amir Goldstein +Date: Wed, 8 Jul 2020 16:16:13 +0300 +Subject: ovl: fix regression with re-formatted lower squashfs + +From: Amir Goldstein + +commit a888db310195400f050b89c47673f0f8babfbb41 upstream. + +Commit 9df085f3c9a2 ("ovl: relax requirement for non null uuid of lower +fs") relaxed the requirement for non null uuid with single lower layer to +allow enabling index and nfs_export features with single lower squashfs. + +Fabian reported a regression in a setup when overlay re-uses an existing +upper layer and re-formats the lower squashfs image. Because squashfs +has no uuid, the origin xattr in upper layer are decoded from the new +lower layer where they may resolve to a wrong origin file and user may +get an ESTALE or EIO error on lookup. + +To avoid the reported regression while still allowing the new features +with single lower squashfs, do not allow decoding origin with lower null +uuid unless user opted-in to one of the new features that require +following the lower inode of non-dir upper (index, xino, metacopy). + +Reported-by: Fabian +Link: https://lore.kernel.org/linux-unionfs/32532923.JtPX5UtSzP@fgdesktop/ +Fixes: 9df085f3c9a2 ("ovl: relax requirement for non null uuid of lower fs") +Cc: stable@vger.kernel.org # v4.20+ +Signed-off-by: Amir Goldstein +Signed-off-by: Miklos Szeredi +Signed-off-by: Greg Kroah-Hartman + +--- + fs/overlayfs/super.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/fs/overlayfs/super.c ++++ b/fs/overlayfs/super.c +@@ -1258,6 +1258,18 @@ static bool ovl_lower_uuid_ok(struct ovl + if (!ofs->config.nfs_export && !ofs->upper_mnt) + return true; + ++ /* ++ * We allow using single lower with null uuid for index and nfs_export ++ * for example to support those features with single lower squashfs. ++ * To avoid regressions in setups of overlay with re-formatted lower ++ * squashfs, do not allow decoding origin with lower null uuid unless ++ * user opted-in to one of the new features that require following the ++ * lower inode of non-dir upper. ++ */ ++ if (!ofs->config.index && !ofs->config.metacopy && !ofs->config.xino && ++ uuid_is_null(uuid)) ++ return false; ++ + for (i = 0; i < ofs->numlowerfs; i++) { + /* + * We use uuid to associate an overlay lower file handle with a diff --git a/queue-5.4/serial-mxs-auart-add-missed-iounmap-in-probe-failure-and-remove.patch b/queue-5.4/serial-mxs-auart-add-missed-iounmap-in-probe-failure-and-remove.patch new file mode 100644 index 00000000000..3f5dce453fa --- /dev/null +++ b/queue-5.4/serial-mxs-auart-add-missed-iounmap-in-probe-failure-and-remove.patch @@ -0,0 +1,76 @@ +From d8edf8eb5f6e921fe6389f96d2cd05862730a6ff Mon Sep 17 00:00:00 2001 +From: Chuhong Yuan +Date: Thu, 9 Jul 2020 21:56:08 +0800 +Subject: serial: mxs-auart: add missed iounmap() in probe failure and remove + +From: Chuhong Yuan + +commit d8edf8eb5f6e921fe6389f96d2cd05862730a6ff upstream. + +This driver calls ioremap() in probe, but it misses calling iounmap() in +probe's error handler and remove. +Add the missed calls to fix it. + +Fixes: 47d37d6f94cc ("serial: Add auart driver for i.MX23/28") +Signed-off-by: Chuhong Yuan +Cc: stable +Link: https://lore.kernel.org/r/20200709135608.68290-1-hslester96@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/mxs-auart.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +--- a/drivers/tty/serial/mxs-auart.c ++++ b/drivers/tty/serial/mxs-auart.c +@@ -1701,21 +1701,21 @@ static int mxs_auart_probe(struct platfo + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + ret = irq; +- goto out_disable_clks; ++ goto out_iounmap; + } + + s->port.irq = irq; + ret = devm_request_irq(&pdev->dev, irq, mxs_auart_irq_handle, 0, + dev_name(&pdev->dev), s); + if (ret) +- goto out_disable_clks; ++ goto out_iounmap; + + platform_set_drvdata(pdev, s); + + ret = mxs_auart_init_gpios(s, &pdev->dev); + if (ret) { + dev_err(&pdev->dev, "Failed to initialize GPIOs.\n"); +- goto out_disable_clks; ++ goto out_iounmap; + } + + /* +@@ -1723,7 +1723,7 @@ static int mxs_auart_probe(struct platfo + */ + ret = mxs_auart_request_gpio_irq(s); + if (ret) +- goto out_disable_clks; ++ goto out_iounmap; + + auart_port[s->port.line] = s; + +@@ -1749,6 +1749,9 @@ out_free_qpio_irq: + mxs_auart_free_gpio_irq(s); + auart_port[pdev->id] = NULL; + ++out_iounmap: ++ iounmap(s->port.membase); ++ + out_disable_clks: + if (is_asm9260_auart(s)) { + clk_disable_unprepare(s->clk); +@@ -1764,6 +1767,7 @@ static int mxs_auart_remove(struct platf + uart_remove_one_port(&auart_driver, &s->port); + auart_port[pdev->id] = NULL; + mxs_auart_free_gpio_irq(s); ++ iounmap(s->port.membase); + if (is_asm9260_auart(s)) { + clk_disable_unprepare(s->clk); + clk_disable_unprepare(s->clk_ahb); diff --git a/queue-5.4/series b/queue-5.4/series index ef86b7f6f80..749a956a7b2 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -165,3 +165,6 @@ usb-serial-option-add-quectel-eg95-lte-modem.patch virt-vbox-fix-vbgl_ioctl_vmmdev_request_big-and-_log-req-numbers-to-match-upstream.patch virt-vbox-fix-guest-capabilities-mask-check.patch revert-tty-xilinx_uartps-fix-missing-id-assignment-to-the-console.patch +virtio-virtio_console-add-missing-module_device_table-for-rproc-serial.patch +serial-mxs-auart-add-missed-iounmap-in-probe-failure-and-remove.patch +ovl-fix-regression-with-re-formatted-lower-squashfs.patch diff --git a/queue-5.4/virtio-virtio_console-add-missing-module_device_table-for-rproc-serial.patch b/queue-5.4/virtio-virtio_console-add-missing-module_device_table-for-rproc-serial.patch new file mode 100644 index 00000000000..b88d012b5a8 --- /dev/null +++ b/queue-5.4/virtio-virtio_console-add-missing-module_device_table-for-rproc-serial.patch @@ -0,0 +1,51 @@ +From 897c44f0bae574c5fb318c759b060bebf9dd6013 Mon Sep 17 00:00:00 2001 +From: Alexander Lobakin +Date: Tue, 23 Jun 2020 11:09:33 +0000 +Subject: virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial + +From: Alexander Lobakin + +commit 897c44f0bae574c5fb318c759b060bebf9dd6013 upstream. + +rproc_serial_id_table lacks an exposure to module devicetable, so +when remoteproc firmware requests VIRTIO_ID_RPROC_SERIAL, no uevent +is generated and no module autoloading occurs. +Add missing MODULE_DEVICE_TABLE() annotation and move the existing +one for VIRTIO_ID_CONSOLE right to the table itself. + +Fixes: 1b6370463e88 ("virtio_console: Add support for remoteproc serial") +Cc: # v3.8+ +Signed-off-by: Alexander Lobakin +Reviewed-by: Amit Shah +Link: https://lore.kernel.org/r/x7C_CbeJtoGMy258nwAXASYz3xgFMFpyzmUvOyZzRnQrgWCREBjaqBOpAUS7ol4NnZYvSVwmTsCG0Ohyfvta-ygw6HMHcoeKK0C3QFiAO_Q=@pm.me +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/virtio_console.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/char/virtio_console.c ++++ b/drivers/char/virtio_console.c +@@ -2118,6 +2118,7 @@ static struct virtio_device_id id_table[ + { VIRTIO_ID_CONSOLE, VIRTIO_DEV_ANY_ID }, + { 0 }, + }; ++MODULE_DEVICE_TABLE(virtio, id_table); + + static unsigned int features[] = { + VIRTIO_CONSOLE_F_SIZE, +@@ -2130,6 +2131,7 @@ static struct virtio_device_id rproc_ser + #endif + { 0 }, + }; ++MODULE_DEVICE_TABLE(virtio, rproc_serial_id_table); + + static unsigned int rproc_serial_features[] = { + }; +@@ -2282,6 +2284,5 @@ static void __exit fini(void) + module_init(init); + module_exit(fini); + +-MODULE_DEVICE_TABLE(virtio, id_table); + MODULE_DESCRIPTION("Virtio console driver"); + MODULE_LICENSE("GPL");