From: Greg Kroah-Hartman Date: Mon, 8 Jul 2024 12:40:57 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v6.6.38~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bddf20f4d30c0aef0bb96b3aa1ad00ee061bfaec;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: bluetooth-fix-incorrect-pointer-arithmatic-in-ext_adv_report_evt.patch can-kvaser_usb-explicitly-initialize-family-in-leafimx-driver_info-struct.patch fsnotify-do-not-generate-events-for-o_path-file-descriptors.patch --- diff --git a/queue-4.19/bluetooth-fix-incorrect-pointer-arithmatic-in-ext_adv_report_evt.patch b/queue-4.19/bluetooth-fix-incorrect-pointer-arithmatic-in-ext_adv_report_evt.patch new file mode 100644 index 00000000000..0876495cf32 --- /dev/null +++ b/queue-4.19/bluetooth-fix-incorrect-pointer-arithmatic-in-ext_adv_report_evt.patch @@ -0,0 +1,32 @@ +From cd9151b618da4723877bd94eae952f2e50acbc0e Mon Sep 17 00:00:00 2001 +From: Jaganath Kanakkassery +Date: Wed, 3 Apr 2019 12:11:44 +0530 +Subject: Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt + +From: Jaganath Kanakkassery + +commit cd9151b618da4723877bd94eae952f2e50acbc0e upstream. + +In ext_adv_report_event rssi comes before data (not after data as +in legacy adv_report_evt) so "+ 1" is not required in the ptr arithmatic +to point to next report. + +Signed-off-by: Jaganath Kanakkassery +Signed-off-by: Marcel Holtmann +Signed-off-by: Wentao Guan +Signed-off-by: Greg Kroah-Hartman +--- + net/bluetooth/hci_event.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/bluetooth/hci_event.c ++++ b/net/bluetooth/hci_event.c +@@ -5448,7 +5448,7 @@ static void hci_le_adv_report_evt(struct + bt_dev_err(hdev, "Dropping invalid advertising data"); + } + +- ptr += sizeof(*ev) + ev->length + 1; ++ ptr += sizeof(*ev) + ev->length; + } + + hci_dev_unlock(hdev); diff --git a/queue-4.19/can-kvaser_usb-explicitly-initialize-family-in-leafimx-driver_info-struct.patch b/queue-4.19/can-kvaser_usb-explicitly-initialize-family-in-leafimx-driver_info-struct.patch new file mode 100644 index 00000000000..1cc3a7fb62b --- /dev/null +++ b/queue-4.19/can-kvaser_usb-explicitly-initialize-family-in-leafimx-driver_info-struct.patch @@ -0,0 +1,33 @@ +From 19d5b2698c35b2132a355c67b4d429053804f8cc Mon Sep 17 00:00:00 2001 +From: Jimmy Assarsson +Date: Fri, 28 Jun 2024 21:45:29 +0200 +Subject: can: kvaser_usb: Explicitly initialize family in leafimx driver_info struct + +From: Jimmy Assarsson + +commit 19d5b2698c35b2132a355c67b4d429053804f8cc upstream. + +Explicitly set the 'family' driver_info struct member for leafimx. +Previously, the correct operation relied on KVASER_LEAF being the first +defined value in enum kvaser_usb_leaf_family. + +Fixes: e6c80e601053 ("can: kvaser_usb: kvaser_usb_leaf: fix CAN clock frequency regression") +Signed-off-by: Jimmy Assarsson +Link: https://lore.kernel.org/all/20240628194529.312968-1-extja@kvaser.com +Cc: stable@vger.kernel.org +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c ++++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +@@ -114,6 +114,7 @@ static const struct kvaser_usb_driver_in + + static const struct kvaser_usb_driver_info kvaser_usb_driver_info_leafimx = { + .quirks = 0, ++ .family = KVASER_LEAF, + .ops = &kvaser_usb_leaf_dev_ops, + }; + diff --git a/queue-4.19/fsnotify-do-not-generate-events-for-o_path-file-descriptors.patch b/queue-4.19/fsnotify-do-not-generate-events-for-o_path-file-descriptors.patch new file mode 100644 index 00000000000..e3ca7ff5497 --- /dev/null +++ b/queue-4.19/fsnotify-do-not-generate-events-for-o_path-file-descriptors.patch @@ -0,0 +1,44 @@ +From 702eb71fd6501b3566283f8c96d7ccc6ddd662e9 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Mon, 17 Jun 2024 18:23:00 +0200 +Subject: fsnotify: Do not generate events for O_PATH file descriptors + +From: Jan Kara + +commit 702eb71fd6501b3566283f8c96d7ccc6ddd662e9 upstream. + +Currently we will not generate FS_OPEN events for O_PATH file +descriptors but we will generate FS_CLOSE events for them. This is +asymmetry is confusing. Arguably no fsnotify events should be generated +for O_PATH file descriptors as they cannot be used to access or modify +file content, they are just convenient handles to file objects like +paths. So fix the asymmetry by stopping to generate FS_CLOSE for O_PATH +file descriptors. + +Cc: +Signed-off-by: Jan Kara +Link: https://lore.kernel.org/r/20240617162303.1596-1-jack@suse.cz +Reviewed-by: Amir Goldstein +Signed-off-by: Christian Brauner +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/fsnotify.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/include/linux/fsnotify.h ++++ b/include/linux/fsnotify.h +@@ -34,7 +34,13 @@ static inline int fsnotify_perm(struct f + __u32 fsnotify_mask = 0; + int ret; + +- if (file->f_mode & FMODE_NONOTIFY) ++ /* ++ * FMODE_NONOTIFY are fds generated by fanotify itself which should not ++ * generate new events. We also don't want to generate events for ++ * FMODE_PATH fds (involves open & close events) as they are just ++ * handle creation / destruction events and not "real" file events. ++ */ ++ if (file->f_mode & (FMODE_NONOTIFY | FMODE_PATH)) + return 0; + if (!(mask & (MAY_READ | MAY_OPEN))) + return 0; diff --git a/queue-4.19/series b/queue-4.19/series index 6f53b8fc8b2..e98664300e5 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -31,3 +31,6 @@ inet_diag-initialize-pad-field-in-struct-inet_diag_r.patch nilfs2-fix-inode-number-range-checks.patch nilfs2-add-missing-check-for-inode-numbers-on-directory-entries.patch mm-optimize-the-redundant-loop-of-mm_update_owner_next.patch +bluetooth-fix-incorrect-pointer-arithmatic-in-ext_adv_report_evt.patch +can-kvaser_usb-explicitly-initialize-family-in-leafimx-driver_info-struct.patch +fsnotify-do-not-generate-events-for-o_path-file-descriptors.patch