]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2020 15:54:55 +0000 (16:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2020 15:54:55 +0000 (16:54 +0100)
added patches:
ext4-correctly-report-not-supported-for-usr-grp-jquota-when-config_quota.patch
ext4-unlock-xattr_sem-properly-in-ext4_inline_data_truncate.patch
usb-cdc-acm-add-disable_echo-for-renesas-usb-download-mode.patch

queue-4.4/ext4-correctly-report-not-supported-for-usr-grp-jquota-when-config_quota.patch [new file with mode: 0644]
queue-4.4/ext4-unlock-xattr_sem-properly-in-ext4_inline_data_truncate.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/usb-cdc-acm-add-disable_echo-for-renesas-usb-download-mode.patch [new file with mode: 0644]

diff --git a/queue-4.4/ext4-correctly-report-not-supported-for-usr-grp-jquota-when-config_quota.patch b/queue-4.4/ext4-correctly-report-not-supported-for-usr-grp-jquota-when-config_quota.patch
new file mode 100644 (file)
index 0000000..8516e26
--- /dev/null
@@ -0,0 +1,46 @@
+From 174fe5ba2d1ea0d6c5ab2a7d4aa058d6d497ae4d Mon Sep 17 00:00:00 2001
+From: Kaixu Xia <kaixuxia@tencent.com>
+Date: Thu, 29 Oct 2020 23:46:36 +0800
+Subject: ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA
+
+From: Kaixu Xia <kaixuxia@tencent.com>
+
+commit 174fe5ba2d1ea0d6c5ab2a7d4aa058d6d497ae4d upstream.
+
+The macro MOPT_Q is used to indicates the mount option is related to
+quota stuff and is defined to be MOPT_NOSUPPORT when CONFIG_QUOTA is
+disabled.  Normally the quota options are handled explicitly, so it
+didn't matter that the MOPT_STRING flag was missing, even though the
+usrjquota and grpjquota mount options take a string argument.  It's
+important that's present in the !CONFIG_QUOTA case, since without
+MOPT_STRING, the mount option matcher will match usrjquota= followed
+by an integer, and will otherwise skip the table entry, and so "mount
+option not supported" error message is never reported.
+
+[ Fixed up the commit description to better explain why the fix
+  works. --TYT ]
+
+Fixes: 26092bf52478 ("ext4: use a table-driven handler for mount options")
+Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
+Link: https://lore.kernel.org/r/1603986396-28917-1-git-send-email-kaixuxia@tencent.com
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Cc: stable@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ext4/super.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/fs/ext4/super.c
++++ b/fs/ext4/super.c
+@@ -1452,8 +1452,8 @@ static const struct mount_opts {
+                                                       MOPT_SET | MOPT_Q},
+       {Opt_noquota, (EXT4_MOUNT_QUOTA | EXT4_MOUNT_USRQUOTA |
+                      EXT4_MOUNT_GRPQUOTA), MOPT_CLEAR | MOPT_Q},
+-      {Opt_usrjquota, 0, MOPT_Q},
+-      {Opt_grpjquota, 0, MOPT_Q},
++      {Opt_usrjquota, 0, MOPT_Q | MOPT_STRING},
++      {Opt_grpjquota, 0, MOPT_Q | MOPT_STRING},
+       {Opt_offusrjquota, 0, MOPT_Q},
+       {Opt_offgrpjquota, 0, MOPT_Q},
+       {Opt_jqfmt_vfsold, QFMT_VFS_OLD, MOPT_QFMT},
diff --git a/queue-4.4/ext4-unlock-xattr_sem-properly-in-ext4_inline_data_truncate.patch b/queue-4.4/ext4-unlock-xattr_sem-properly-in-ext4_inline_data_truncate.patch
new file mode 100644 (file)
index 0000000..da36a99
--- /dev/null
@@ -0,0 +1,36 @@
+From 7067b2619017d51e71686ca9756b454de0e5826a Mon Sep 17 00:00:00 2001
+From: Joseph Qi <joseph.qi@linux.alibaba.com>
+Date: Tue, 3 Nov 2020 10:29:02 +0800
+Subject: ext4: unlock xattr_sem properly in ext4_inline_data_truncate()
+
+From: Joseph Qi <joseph.qi@linux.alibaba.com>
+
+commit 7067b2619017d51e71686ca9756b454de0e5826a upstream.
+
+It takes xattr_sem to check inline data again but without unlock it
+in case not have. So unlock it before return.
+
+Fixes: aef1c8513c1f ("ext4: let ext4_truncate handle inline data correctly")
+Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+Cc: Tao Ma <boyu.mt@taobao.com>
+Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
+Reviewed-by: Andreas Dilger <adilger@dilger.ca>
+Link: https://lore.kernel.org/r/1604370542-124630-1-git-send-email-joseph.qi@linux.alibaba.com
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Cc: stable@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ext4/inline.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/ext4/inline.c
++++ b/fs/ext4/inline.c
+@@ -1892,6 +1892,7 @@ void ext4_inline_data_truncate(struct in
+       ext4_write_lock_xattr(inode, &no_expand);
+       if (!ext4_has_inline_data(inode)) {
++              ext4_write_unlock_xattr(inode, &no_expand);
+               *has_inline = 0;
+               ext4_journal_stop(handle);
+               return;
index 7fdd81f483a631ddfc2d5686d17393d4d0fe5e9b..185fce52fe5c7014c9c8f6d06f700ceb699d7c5e 100644 (file)
@@ -29,3 +29,6 @@ xfs-fix-a-missing-unlock-on-error-in-xfs_fs_map_bloc.patch
 of-address-fix-of_node-memory-leak-in-of_dma_is_cohe.patch
 cosa-add-missing-kfree-in-error-path-of-cosa_write.patch
 perf-fix-get_recursion_context.patch
+ext4-correctly-report-not-supported-for-usr-grp-jquota-when-config_quota.patch
+ext4-unlock-xattr_sem-properly-in-ext4_inline_data_truncate.patch
+usb-cdc-acm-add-disable_echo-for-renesas-usb-download-mode.patch
diff --git a/queue-4.4/usb-cdc-acm-add-disable_echo-for-renesas-usb-download-mode.patch b/queue-4.4/usb-cdc-acm-add-disable_echo-for-renesas-usb-download-mode.patch
new file mode 100644 (file)
index 0000000..725f773
--- /dev/null
@@ -0,0 +1,41 @@
+From 6d853c9e4104b4fc8d55dc9cd3b99712aa347174 Mon Sep 17 00:00:00 2001
+From: Chris Brandt <chris.brandt@renesas.com>
+Date: Wed, 11 Nov 2020 08:12:09 -0500
+Subject: usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode
+
+From: Chris Brandt <chris.brandt@renesas.com>
+
+commit 6d853c9e4104b4fc8d55dc9cd3b99712aa347174 upstream.
+
+Renesas R-Car and RZ/G SoCs have a firmware download mode over USB.
+However, on reset a banner string is transmitted out which is not expected
+to be echoed back and will corrupt the protocol.
+
+Cc: stable <stable@vger.kernel.org>
+Acked-by: Oliver Neukum <oneukum@suse.com>
+Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
+Link: https://lore.kernel.org/r/20201111131209.3977903-1-chris.brandt@renesas.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/class/cdc-acm.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -1693,6 +1693,15 @@ static const struct usb_device_id acm_id
+       { USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */
+       .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
+       },
++      { USB_DEVICE(0x045b, 0x023c),   /* Renesas USB Download mode */
++      .driver_info = DISABLE_ECHO,    /* Don't echo banner */
++      },
++      { USB_DEVICE(0x045b, 0x0248),   /* Renesas USB Download mode */
++      .driver_info = DISABLE_ECHO,    /* Don't echo banner */
++      },
++      { USB_DEVICE(0x045b, 0x024D),   /* Renesas USB Download mode */
++      .driver_info = DISABLE_ECHO,    /* Don't echo banner */
++      },
+       { USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; andrey.arapov@gmail.com */
+       .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
+       },