From: Greg Kroah-Hartman Date: Mon, 16 Nov 2020 15:54:55 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.244~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=05d1bbadb64f82d84728c1b5ab3de90e0f5b14dc;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches 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 --- 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 index 00000000000..8516e26f764 --- /dev/null +++ b/queue-4.4/ext4-correctly-report-not-supported-for-usr-grp-jquota-when-config_quota.patch @@ -0,0 +1,46 @@ +From 174fe5ba2d1ea0d6c5ab2a7d4aa058d6d497ae4d Mon Sep 17 00:00:00 2001 +From: Kaixu Xia +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 + +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 +Link: https://lore.kernel.org/r/1603986396-28917-1-git-send-email-kaixuxia@tencent.com +Signed-off-by: Theodore Ts'o +Cc: stable@kernel.org +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..da36a99040b --- /dev/null +++ b/queue-4.4/ext4-unlock-xattr_sem-properly-in-ext4_inline_data_truncate.patch @@ -0,0 +1,36 @@ +From 7067b2619017d51e71686ca9756b454de0e5826a Mon Sep 17 00:00:00 2001 +From: Joseph Qi +Date: Tue, 3 Nov 2020 10:29:02 +0800 +Subject: ext4: unlock xattr_sem properly in ext4_inline_data_truncate() + +From: Joseph Qi + +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 +Cc: Tao Ma +Signed-off-by: Joseph Qi +Reviewed-by: Andreas Dilger +Link: https://lore.kernel.org/r/1604370542-124630-1-git-send-email-joseph.qi@linux.alibaba.com +Signed-off-by: Theodore Ts'o +Cc: stable@kernel.org +Signed-off-by: Greg Kroah-Hartman + +--- + 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; diff --git a/queue-4.4/series b/queue-4.4/series index 7fdd81f483a..185fce52fe5 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -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 index 00000000000..725f773e655 --- /dev/null +++ b/queue-4.4/usb-cdc-acm-add-disable_echo-for-renesas-usb-download-mode.patch @@ -0,0 +1,41 @@ +From 6d853c9e4104b4fc8d55dc9cd3b99712aa347174 Mon Sep 17 00:00:00 2001 +From: Chris Brandt +Date: Wed, 11 Nov 2020 08:12:09 -0500 +Subject: usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode + +From: Chris Brandt + +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 +Acked-by: Oliver Neukum +Signed-off-by: Chris Brandt +Link: https://lore.kernel.org/r/20201111131209.3977903-1-chris.brandt@renesas.com +Signed-off-by: Greg Kroah-Hartman + +--- + 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 */ + },