From a21c5a53265510f5abb4243e4dc575fd27c4ee07 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 29 Jul 2024 10:16:09 +0200 Subject: [PATCH] 5.10-stable patches added patches: af_packet-handle-outgoing-vlan-packets-without-hardware-offloading.patch char-tpm-fix-possible-memory-leak-in-tpm_bios_measurements_open.patch drm-gma500-fix-null-pointer-dereference-in-cdv_intel_lvds_get_modes.patch drm-gma500-fix-null-pointer-dereference-in-psb_intel_lvds_get_modes.patch dt-bindings-thermal-correct-thermal-zone-node-name-limit.patch ext2-verify-bitmap-and-itable-block-numbers-before-using-them.patch hfs-fix-to-initialize-fields-of-hfs_inode_info-after-hfs_alloc_inode.patch ipv6-take-care-of-scope-when-choosing-the-src-addr.patch media-venus-fix-use-after-free-in-vdec_close.patch net-netconsole-disable-target-before-netpoll-cleanup.patch sched-fair-set_load_weight-must-also-call-reweight_task-for-sched_idle-tasks.patch tick-broadcast-make-takeover-of-broadcast-hrtimer-reliable.patch --- ...-packets-without-hardware-offloading.patch | 173 ++++++++++++++++++ ...y-leak-in-tpm_bios_measurements_open.patch | 35 ++++ ...eference-in-cdv_intel_lvds_get_modes.patch | 35 ++++ ...eference-in-psb_intel_lvds_get_modes.patch | 35 ++++ ...correct-thermal-zone-node-name-limit.patch | 46 +++++ ...able-block-numbers-before-using-them.patch | 57 ++++++ ...hfs_inode_info-after-hfs_alloc_inode.patch | 122 ++++++++++++ ...-of-scope-when-choosing-the-src-addr.patch | 36 ++++ ...nus-fix-use-after-free-in-vdec_close.patch | 38 ++++ ...isable-target-before-netpoll-cleanup.patch | 52 ++++++ ...l-reweight_task-for-sched_idle-tasks.patch | 107 +++++++++++ queue-5.10/series | 12 ++ ...keover-of-broadcast-hrtimer-reliable.patch | 109 +++++++++++ 13 files changed, 857 insertions(+) create mode 100644 queue-5.10/af_packet-handle-outgoing-vlan-packets-without-hardware-offloading.patch create mode 100644 queue-5.10/char-tpm-fix-possible-memory-leak-in-tpm_bios_measurements_open.patch create mode 100644 queue-5.10/drm-gma500-fix-null-pointer-dereference-in-cdv_intel_lvds_get_modes.patch create mode 100644 queue-5.10/drm-gma500-fix-null-pointer-dereference-in-psb_intel_lvds_get_modes.patch create mode 100644 queue-5.10/dt-bindings-thermal-correct-thermal-zone-node-name-limit.patch create mode 100644 queue-5.10/ext2-verify-bitmap-and-itable-block-numbers-before-using-them.patch create mode 100644 queue-5.10/hfs-fix-to-initialize-fields-of-hfs_inode_info-after-hfs_alloc_inode.patch create mode 100644 queue-5.10/ipv6-take-care-of-scope-when-choosing-the-src-addr.patch create mode 100644 queue-5.10/media-venus-fix-use-after-free-in-vdec_close.patch create mode 100644 queue-5.10/net-netconsole-disable-target-before-netpoll-cleanup.patch create mode 100644 queue-5.10/sched-fair-set_load_weight-must-also-call-reweight_task-for-sched_idle-tasks.patch create mode 100644 queue-5.10/tick-broadcast-make-takeover-of-broadcast-hrtimer-reliable.patch diff --git a/queue-5.10/af_packet-handle-outgoing-vlan-packets-without-hardware-offloading.patch b/queue-5.10/af_packet-handle-outgoing-vlan-packets-without-hardware-offloading.patch new file mode 100644 index 00000000000..f47e614c861 --- /dev/null +++ b/queue-5.10/af_packet-handle-outgoing-vlan-packets-without-hardware-offloading.patch @@ -0,0 +1,173 @@ +From 79eecf631c14e7f4057186570ac20e2cfac3802e Mon Sep 17 00:00:00 2001 +From: Chengen Du +Date: Sat, 13 Jul 2024 19:47:35 +0800 +Subject: af_packet: Handle outgoing VLAN packets without hardware offloading + +From: Chengen Du + +commit 79eecf631c14e7f4057186570ac20e2cfac3802e upstream. + +The issue initially stems from libpcap. The ethertype will be overwritten +as the VLAN TPID if the network interface lacks hardware VLAN offloading. +In the outbound packet path, if hardware VLAN offloading is unavailable, +the VLAN tag is inserted into the payload but then cleared from the sk_buff +struct. Consequently, this can lead to a false negative when checking for +the presence of a VLAN tag, causing the packet sniffing outcome to lack +VLAN tag information (i.e., TCI-TPID). As a result, the packet capturing +tool may be unable to parse packets as expected. + +The TCI-TPID is missing because the prb_fill_vlan_info() function does not +modify the tp_vlan_tci/tp_vlan_tpid values, as the information is in the +payload and not in the sk_buff struct. The skb_vlan_tag_present() function +only checks vlan_all in the sk_buff struct. In cooked mode, the L2 header +is stripped, preventing the packet capturing tool from determining the +correct TCI-TPID value. Additionally, the protocol in SLL is incorrect, +which means the packet capturing tool cannot parse the L3 header correctly. + +Link: https://github.com/the-tcpdump-group/libpcap/issues/1105 +Link: https://lore.kernel.org/netdev/20240520070348.26725-1-chengen.du@canonical.com/T/#u +Fixes: 393e52e33c6c ("packet: deliver VLAN TCI to userspace") +Cc: stable@vger.kernel.org +Signed-off-by: Chengen Du +Reviewed-by: Willem de Bruijn +Link: https://patch.msgid.link/20240713114735.62360-1-chengen.du@canonical.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + net/packet/af_packet.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 84 insertions(+), 2 deletions(-) + +--- a/net/packet/af_packet.c ++++ b/net/packet/af_packet.c +@@ -503,6 +503,61 @@ static void *packet_current_frame(struct + return packet_lookup_frame(po, rb, rb->head, status); + } + ++static u16 vlan_get_tci(struct sk_buff *skb, struct net_device *dev) ++{ ++ u8 *skb_orig_data = skb->data; ++ int skb_orig_len = skb->len; ++ struct vlan_hdr vhdr, *vh; ++ unsigned int header_len; ++ ++ if (!dev) ++ return 0; ++ ++ /* In the SOCK_DGRAM scenario, skb data starts at the network ++ * protocol, which is after the VLAN headers. The outer VLAN ++ * header is at the hard_header_len offset in non-variable ++ * length link layer headers. If it's a VLAN device, the ++ * min_header_len should be used to exclude the VLAN header ++ * size. ++ */ ++ if (dev->min_header_len == dev->hard_header_len) ++ header_len = dev->hard_header_len; ++ else if (is_vlan_dev(dev)) ++ header_len = dev->min_header_len; ++ else ++ return 0; ++ ++ skb_push(skb, skb->data - skb_mac_header(skb)); ++ vh = skb_header_pointer(skb, header_len, sizeof(vhdr), &vhdr); ++ if (skb_orig_data != skb->data) { ++ skb->data = skb_orig_data; ++ skb->len = skb_orig_len; ++ } ++ if (unlikely(!vh)) ++ return 0; ++ ++ return ntohs(vh->h_vlan_TCI); ++} ++ ++static __be16 vlan_get_protocol_dgram(struct sk_buff *skb) ++{ ++ __be16 proto = skb->protocol; ++ ++ if (unlikely(eth_type_vlan(proto))) { ++ u8 *skb_orig_data = skb->data; ++ int skb_orig_len = skb->len; ++ ++ skb_push(skb, skb->data - skb_mac_header(skb)); ++ proto = __vlan_get_protocol(skb, proto, NULL); ++ if (skb_orig_data != skb->data) { ++ skb->data = skb_orig_data; ++ skb->len = skb_orig_len; ++ } ++ } ++ ++ return proto; ++} ++ + static void prb_del_retire_blk_timer(struct tpacket_kbdq_core *pkc) + { + del_timer_sync(&pkc->retire_blk_timer); +@@ -972,10 +1027,16 @@ static void prb_clear_rxhash(struct tpac + static void prb_fill_vlan_info(struct tpacket_kbdq_core *pkc, + struct tpacket3_hdr *ppd) + { ++ struct packet_sock *po = container_of(pkc, struct packet_sock, rx_ring.prb_bdqc); ++ + if (skb_vlan_tag_present(pkc->skb)) { + ppd->hv1.tp_vlan_tci = skb_vlan_tag_get(pkc->skb); + ppd->hv1.tp_vlan_tpid = ntohs(pkc->skb->vlan_proto); + ppd->tp_status = TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; ++ } else if (unlikely(po->sk.sk_type == SOCK_DGRAM && eth_type_vlan(pkc->skb->protocol))) { ++ ppd->hv1.tp_vlan_tci = vlan_get_tci(pkc->skb, pkc->skb->dev); ++ ppd->hv1.tp_vlan_tpid = ntohs(pkc->skb->protocol); ++ ppd->tp_status = TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; + } else { + ppd->hv1.tp_vlan_tci = 0; + ppd->hv1.tp_vlan_tpid = 0; +@@ -2390,6 +2451,10 @@ static int tpacket_rcv(struct sk_buff *s + h.h2->tp_vlan_tci = skb_vlan_tag_get(skb); + h.h2->tp_vlan_tpid = ntohs(skb->vlan_proto); + status |= TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; ++ } else if (unlikely(sk->sk_type == SOCK_DGRAM && eth_type_vlan(skb->protocol))) { ++ h.h2->tp_vlan_tci = vlan_get_tci(skb, skb->dev); ++ h.h2->tp_vlan_tpid = ntohs(skb->protocol); ++ status |= TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; + } else { + h.h2->tp_vlan_tci = 0; + h.h2->tp_vlan_tpid = 0; +@@ -2419,7 +2484,8 @@ static int tpacket_rcv(struct sk_buff *s + sll->sll_halen = dev_parse_header(skb, sll->sll_addr); + sll->sll_family = AF_PACKET; + sll->sll_hatype = dev->type; +- sll->sll_protocol = skb->protocol; ++ sll->sll_protocol = (sk->sk_type == SOCK_DGRAM) ? ++ vlan_get_protocol_dgram(skb) : skb->protocol; + sll->sll_pkttype = skb->pkt_type; + if (unlikely(packet_sock_flag(po, PACKET_SOCK_ORIGDEV))) + sll->sll_ifindex = orig_dev->ifindex; +@@ -3451,7 +3517,8 @@ static int packet_recvmsg(struct socket + /* Original length was stored in sockaddr_ll fields */ + origlen = PACKET_SKB_CB(skb)->sa.origlen; + sll->sll_family = AF_PACKET; +- sll->sll_protocol = skb->protocol; ++ sll->sll_protocol = (sock->type == SOCK_DGRAM) ? ++ vlan_get_protocol_dgram(skb) : skb->protocol; + } + + sock_recv_ts_and_drops(msg, sk, skb); +@@ -3506,6 +3573,21 @@ static int packet_recvmsg(struct socket + aux.tp_vlan_tci = skb_vlan_tag_get(skb); + aux.tp_vlan_tpid = ntohs(skb->vlan_proto); + aux.tp_status |= TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; ++ } else if (unlikely(sock->type == SOCK_DGRAM && eth_type_vlan(skb->protocol))) { ++ struct sockaddr_ll *sll = &PACKET_SKB_CB(skb)->sa.ll; ++ struct net_device *dev; ++ ++ rcu_read_lock(); ++ dev = dev_get_by_index_rcu(sock_net(sk), sll->sll_ifindex); ++ if (dev) { ++ aux.tp_vlan_tci = vlan_get_tci(skb, dev); ++ aux.tp_vlan_tpid = ntohs(skb->protocol); ++ aux.tp_status |= TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; ++ } else { ++ aux.tp_vlan_tci = 0; ++ aux.tp_vlan_tpid = 0; ++ } ++ rcu_read_unlock(); + } else { + aux.tp_vlan_tci = 0; + aux.tp_vlan_tpid = 0; diff --git a/queue-5.10/char-tpm-fix-possible-memory-leak-in-tpm_bios_measurements_open.patch b/queue-5.10/char-tpm-fix-possible-memory-leak-in-tpm_bios_measurements_open.patch new file mode 100644 index 00000000000..441ad323784 --- /dev/null +++ b/queue-5.10/char-tpm-fix-possible-memory-leak-in-tpm_bios_measurements_open.patch @@ -0,0 +1,35 @@ +From 5d8e2971e817bb64225fc0b6327a78752f58a9aa Mon Sep 17 00:00:00 2001 +From: Joe Hattori +Date: Thu, 27 Jun 2024 15:31:09 +0900 +Subject: char: tpm: Fix possible memory leak in tpm_bios_measurements_open() + +From: Joe Hattori + +commit 5d8e2971e817bb64225fc0b6327a78752f58a9aa upstream. + +In tpm_bios_measurements_open(), get_device() is called on the device +embedded in struct tpm_chip. In the error path, however, put_device() is +not called. This results in a reference count leak, which prevents the +device from being properly released. This commit makes sure to call +put_device() when the seq_open() call fails. + +Cc: stable@vger.kernel.org # +v4.18 +Fixes: 9b01b5356629 ("tpm: Move shared eventlog functions to common.c") +Signed-off-by: Joe Hattori +Signed-off-by: Jarkko Sakkinen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/char/tpm/eventlog/common.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/char/tpm/eventlog/common.c ++++ b/drivers/char/tpm/eventlog/common.c +@@ -47,6 +47,8 @@ static int tpm_bios_measurements_open(st + if (!err) { + seq = file->private_data; + seq->private = chip; ++ } else { ++ put_device(&chip->dev); + } + + return err; diff --git a/queue-5.10/drm-gma500-fix-null-pointer-dereference-in-cdv_intel_lvds_get_modes.patch b/queue-5.10/drm-gma500-fix-null-pointer-dereference-in-cdv_intel_lvds_get_modes.patch new file mode 100644 index 00000000000..c6982c17f81 --- /dev/null +++ b/queue-5.10/drm-gma500-fix-null-pointer-dereference-in-cdv_intel_lvds_get_modes.patch @@ -0,0 +1,35 @@ +From cb520c3f366c77e8d69e4e2e2781a8ce48d98e79 Mon Sep 17 00:00:00 2001 +From: Ma Ke +Date: Tue, 9 Jul 2024 19:33:11 +0800 +Subject: drm/gma500: fix null pointer dereference in cdv_intel_lvds_get_modes + +From: Ma Ke + +commit cb520c3f366c77e8d69e4e2e2781a8ce48d98e79 upstream. + +In cdv_intel_lvds_get_modes(), the return value of drm_mode_duplicate() +is assigned to mode, which will lead to a NULL pointer dereference on +failure of drm_mode_duplicate(). Add a check to avoid npd. + +Cc: stable@vger.kernel.org +Fixes: 6a227d5fd6c4 ("gma500: Add support for Cedarview") +Signed-off-by: Ma Ke +Signed-off-by: Patrik Jakobsson +Link: https://patchwork.freedesktop.org/patch/msgid/20240709113311.37168-1-make24@iscas.ac.cn +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/gma500/cdv_intel_lvds.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c ++++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c +@@ -310,6 +310,9 @@ static int cdv_intel_lvds_get_modes(stru + if (mode_dev->panel_fixed_mode != NULL) { + struct drm_display_mode *mode = + drm_mode_duplicate(dev, mode_dev->panel_fixed_mode); ++ if (!mode) ++ return 0; ++ + drm_mode_probed_add(connector, mode); + return 1; + } diff --git a/queue-5.10/drm-gma500-fix-null-pointer-dereference-in-psb_intel_lvds_get_modes.patch b/queue-5.10/drm-gma500-fix-null-pointer-dereference-in-psb_intel_lvds_get_modes.patch new file mode 100644 index 00000000000..c99a2bcde18 --- /dev/null +++ b/queue-5.10/drm-gma500-fix-null-pointer-dereference-in-psb_intel_lvds_get_modes.patch @@ -0,0 +1,35 @@ +From 2df7aac81070987b0f052985856aa325a38debf6 Mon Sep 17 00:00:00 2001 +From: Ma Ke +Date: Tue, 9 Jul 2024 17:20:11 +0800 +Subject: drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes + +From: Ma Ke + +commit 2df7aac81070987b0f052985856aa325a38debf6 upstream. + +In psb_intel_lvds_get_modes(), the return value of drm_mode_duplicate() is +assigned to mode, which will lead to a possible NULL pointer dereference +on failure of drm_mode_duplicate(). Add a check to avoid npd. + +Cc: stable@vger.kernel.org +Fixes: 89c78134cc54 ("gma500: Add Poulsbo support") +Signed-off-by: Ma Ke +Signed-off-by: Patrik Jakobsson +Link: https://patchwork.freedesktop.org/patch/msgid/20240709092011.3204970-1-make24@iscas.ac.cn +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/gma500/psb_intel_lvds.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/gpu/drm/gma500/psb_intel_lvds.c ++++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c +@@ -508,6 +508,9 @@ static int psb_intel_lvds_get_modes(stru + if (mode_dev->panel_fixed_mode != NULL) { + struct drm_display_mode *mode = + drm_mode_duplicate(dev, mode_dev->panel_fixed_mode); ++ if (!mode) ++ return 0; ++ + drm_mode_probed_add(connector, mode); + return 1; + } diff --git a/queue-5.10/dt-bindings-thermal-correct-thermal-zone-node-name-limit.patch b/queue-5.10/dt-bindings-thermal-correct-thermal-zone-node-name-limit.patch new file mode 100644 index 00000000000..b5f11da233f --- /dev/null +++ b/queue-5.10/dt-bindings-thermal-correct-thermal-zone-node-name-limit.patch @@ -0,0 +1,46 @@ +From 97e32381d0fc6c2602a767b0c46e15eb2b75971d Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Tue, 2 Jul 2024 16:52:48 +0200 +Subject: dt-bindings: thermal: correct thermal zone node name limit + +From: Krzysztof Kozlowski + +commit 97e32381d0fc6c2602a767b0c46e15eb2b75971d upstream. + +Linux kernel uses thermal zone node name during registering thermal +zones and has a hard-coded limit of 20 characters, including terminating +NUL byte. The bindings expect node names to finish with '-thermal' +which is eight bytes long, thus we have only 11 characters for the reset +of the node name (thus 10 for the pattern after leading fixed character). + +Reported-by: Rob Herring +Closes: https://lore.kernel.org/all/CAL_JsqKogbT_4DPd1n94xqeHaU_J8ve5K09WOyVsRX3jxxUW3w@mail.gmail.com/ +Fixes: 1202a442a31f ("dt-bindings: thermal: Add yaml bindings for thermal zones") +Cc: stable@vger.kernel.org +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20240702145248.47184-1-krzysztof.kozlowski@linaro.org +Signed-off-by: Daniel Lezcano +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/devicetree/bindings/thermal/thermal-zones.yaml | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml +index 68398e7e8655..606b80965a44 100644 +--- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml ++++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml +@@ -49,7 +49,10 @@ properties: + to take when the temperature crosses those thresholds. + + patternProperties: +- "^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$": ++ # Node name is limited in size due to Linux kernel requirements - 19 ++ # characters in total (see THERMAL_NAME_LENGTH, including terminating NUL ++ # byte): ++ "^[a-zA-Z][a-zA-Z0-9\\-]{1,10}-thermal$": + type: object + description: + Each thermal zone node contains information about how frequently it +-- +2.45.2 + diff --git a/queue-5.10/ext2-verify-bitmap-and-itable-block-numbers-before-using-them.patch b/queue-5.10/ext2-verify-bitmap-and-itable-block-numbers-before-using-them.patch new file mode 100644 index 00000000000..9a4ae37c52c --- /dev/null +++ b/queue-5.10/ext2-verify-bitmap-and-itable-block-numbers-before-using-them.patch @@ -0,0 +1,57 @@ +From 322a6aff03937aa1ece33b4e46c298eafaf9ac41 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Mon, 24 Jun 2024 17:12:56 +0200 +Subject: ext2: Verify bitmap and itable block numbers before using them + +From: Jan Kara + +commit 322a6aff03937aa1ece33b4e46c298eafaf9ac41 upstream. + +Verify bitmap block numbers and inode table blocks are sane before using +them for checking bits in the block bitmap. + +CC: stable@vger.kernel.org +Signed-off-by: Jan Kara +Signed-off-by: Greg Kroah-Hartman +--- + fs/ext2/balloc.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/fs/ext2/balloc.c ++++ b/fs/ext2/balloc.c +@@ -79,26 +79,33 @@ static int ext2_valid_block_bitmap(struc + ext2_grpblk_t next_zero_bit; + ext2_fsblk_t bitmap_blk; + ext2_fsblk_t group_first_block; ++ ext2_grpblk_t max_bit; + + group_first_block = ext2_group_first_block_no(sb, block_group); ++ max_bit = ext2_group_last_block_no(sb, block_group) - group_first_block; + + /* check whether block bitmap block number is set */ + bitmap_blk = le32_to_cpu(desc->bg_block_bitmap); + offset = bitmap_blk - group_first_block; +- if (!ext2_test_bit(offset, bh->b_data)) ++ if (offset < 0 || offset > max_bit || ++ !ext2_test_bit(offset, bh->b_data)) + /* bad block bitmap */ + goto err_out; + + /* check whether the inode bitmap block number is set */ + bitmap_blk = le32_to_cpu(desc->bg_inode_bitmap); + offset = bitmap_blk - group_first_block; +- if (!ext2_test_bit(offset, bh->b_data)) ++ if (offset < 0 || offset > max_bit || ++ !ext2_test_bit(offset, bh->b_data)) + /* bad block bitmap */ + goto err_out; + + /* check whether the inode table block number is set */ + bitmap_blk = le32_to_cpu(desc->bg_inode_table); + offset = bitmap_blk - group_first_block; ++ if (offset < 0 || offset > max_bit || ++ offset + EXT2_SB(sb)->s_itb_per_group - 1 > max_bit) ++ goto err_out; + next_zero_bit = ext2_find_next_zero_bit(bh->b_data, + offset + EXT2_SB(sb)->s_itb_per_group, + offset); diff --git a/queue-5.10/hfs-fix-to-initialize-fields-of-hfs_inode_info-after-hfs_alloc_inode.patch b/queue-5.10/hfs-fix-to-initialize-fields-of-hfs_inode_info-after-hfs_alloc_inode.patch new file mode 100644 index 00000000000..71d635be16b --- /dev/null +++ b/queue-5.10/hfs-fix-to-initialize-fields-of-hfs_inode_info-after-hfs_alloc_inode.patch @@ -0,0 +1,122 @@ +From 26a2ed107929a855155429b11e1293b83e6b2a8b Mon Sep 17 00:00:00 2001 +From: Chao Yu +Date: Sun, 16 Jun 2024 09:38:41 +0800 +Subject: hfs: fix to initialize fields of hfs_inode_info after hfs_alloc_inode() + +From: Chao Yu + +commit 26a2ed107929a855155429b11e1293b83e6b2a8b upstream. + +Syzbot reports uninitialized value access issue as below: + +loop0: detected capacity change from 0 to 64 +===================================================== +BUG: KMSAN: uninit-value in hfs_revalidate_dentry+0x307/0x3f0 fs/hfs/sysdep.c:30 + hfs_revalidate_dentry+0x307/0x3f0 fs/hfs/sysdep.c:30 + d_revalidate fs/namei.c:862 [inline] + lookup_fast+0x89e/0x8e0 fs/namei.c:1649 + walk_component fs/namei.c:2001 [inline] + link_path_walk+0x817/0x1480 fs/namei.c:2332 + path_lookupat+0xd9/0x6f0 fs/namei.c:2485 + filename_lookup+0x22e/0x740 fs/namei.c:2515 + user_path_at_empty+0x8b/0x390 fs/namei.c:2924 + user_path_at include/linux/namei.h:57 [inline] + do_mount fs/namespace.c:3689 [inline] + __do_sys_mount fs/namespace.c:3898 [inline] + __se_sys_mount+0x66b/0x810 fs/namespace.c:3875 + __x64_sys_mount+0xe4/0x140 fs/namespace.c:3875 + do_syscall_x64 arch/x86/entry/common.c:52 [inline] + do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83 + entry_SYSCALL_64_after_hwframe+0x63/0x6b + +BUG: KMSAN: uninit-value in hfs_ext_read_extent fs/hfs/extent.c:196 [inline] +BUG: KMSAN: uninit-value in hfs_get_block+0x92d/0x1620 fs/hfs/extent.c:366 + hfs_ext_read_extent fs/hfs/extent.c:196 [inline] + hfs_get_block+0x92d/0x1620 fs/hfs/extent.c:366 + block_read_full_folio+0x4ff/0x11b0 fs/buffer.c:2271 + hfs_read_folio+0x55/0x60 fs/hfs/inode.c:39 + filemap_read_folio+0x148/0x4f0 mm/filemap.c:2426 + do_read_cache_folio+0x7c8/0xd90 mm/filemap.c:3553 + do_read_cache_page mm/filemap.c:3595 [inline] + read_cache_page+0xfb/0x2f0 mm/filemap.c:3604 + read_mapping_page include/linux/pagemap.h:755 [inline] + hfs_btree_open+0x928/0x1ae0 fs/hfs/btree.c:78 + hfs_mdb_get+0x260c/0x3000 fs/hfs/mdb.c:204 + hfs_fill_super+0x1fb1/0x2790 fs/hfs/super.c:406 + mount_bdev+0x628/0x920 fs/super.c:1359 + hfs_mount+0xcd/0xe0 fs/hfs/super.c:456 + legacy_get_tree+0x167/0x2e0 fs/fs_context.c:610 + vfs_get_tree+0xdc/0x5d0 fs/super.c:1489 + do_new_mount+0x7a9/0x16f0 fs/namespace.c:3145 + path_mount+0xf98/0x26a0 fs/namespace.c:3475 + do_mount fs/namespace.c:3488 [inline] + __do_sys_mount fs/namespace.c:3697 [inline] + __se_sys_mount+0x919/0x9e0 fs/namespace.c:3674 + __ia32_sys_mount+0x15b/0x1b0 fs/namespace.c:3674 + do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] + __do_fast_syscall_32+0xa2/0x100 arch/x86/entry/common.c:178 + do_fast_syscall_32+0x37/0x80 arch/x86/entry/common.c:203 + do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:246 + entry_SYSENTER_compat_after_hwframe+0x70/0x82 + +Uninit was created at: + __alloc_pages+0x9a6/0xe00 mm/page_alloc.c:4590 + __alloc_pages_node include/linux/gfp.h:238 [inline] + alloc_pages_node include/linux/gfp.h:261 [inline] + alloc_slab_page mm/slub.c:2190 [inline] + allocate_slab mm/slub.c:2354 [inline] + new_slab+0x2d7/0x1400 mm/slub.c:2407 + ___slab_alloc+0x16b5/0x3970 mm/slub.c:3540 + __slab_alloc mm/slub.c:3625 [inline] + __slab_alloc_node mm/slub.c:3678 [inline] + slab_alloc_node mm/slub.c:3850 [inline] + kmem_cache_alloc_lru+0x64d/0xb30 mm/slub.c:3879 + alloc_inode_sb include/linux/fs.h:3018 [inline] + hfs_alloc_inode+0x5a/0xc0 fs/hfs/super.c:165 + alloc_inode+0x83/0x440 fs/inode.c:260 + new_inode_pseudo fs/inode.c:1005 [inline] + new_inode+0x38/0x4f0 fs/inode.c:1031 + hfs_new_inode+0x61/0x1010 fs/hfs/inode.c:186 + hfs_mkdir+0x54/0x250 fs/hfs/dir.c:228 + vfs_mkdir+0x49a/0x700 fs/namei.c:4126 + do_mkdirat+0x529/0x810 fs/namei.c:4149 + __do_sys_mkdirat fs/namei.c:4164 [inline] + __se_sys_mkdirat fs/namei.c:4162 [inline] + __x64_sys_mkdirat+0xc8/0x120 fs/namei.c:4162 + do_syscall_x64 arch/x86/entry/common.c:52 [inline] + do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83 + entry_SYSCALL_64_after_hwframe+0x63/0x6b + +It missed to initialize .tz_secondswest, .cached_start and .cached_blocks +fields in struct hfs_inode_info after hfs_alloc_inode(), fix it. + +Cc: stable@vger.kernel.org +Reported-by: syzbot+3ae6be33a50b5aae4dab@syzkaller.appspotmail.com +Closes: https://lore.kernel.org/linux-fsdevel/0000000000005ad04005ee48897f@google.com +Signed-off-by: Chao Yu +Link: https://lore.kernel.org/r/20240616013841.2217-1-chao@kernel.org +Signed-off-by: Christian Brauner +Signed-off-by: Greg Kroah-Hartman +--- + fs/hfs/inode.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/fs/hfs/inode.c ++++ b/fs/hfs/inode.c +@@ -200,6 +200,7 @@ struct inode *hfs_new_inode(struct inode + HFS_I(inode)->flags = 0; + HFS_I(inode)->rsrc_inode = NULL; + HFS_I(inode)->fs_blocks = 0; ++ HFS_I(inode)->tz_secondswest = sys_tz.tz_minuteswest * 60; + if (S_ISDIR(mode)) { + inode->i_size = 2; + HFS_SB(sb)->folder_count++; +@@ -275,6 +276,8 @@ void hfs_inode_read_fork(struct inode *i + for (count = 0, i = 0; i < 3; i++) + count += be16_to_cpu(ext[i].count); + HFS_I(inode)->first_blocks = count; ++ HFS_I(inode)->cached_start = 0; ++ HFS_I(inode)->cached_blocks = 0; + + inode->i_size = HFS_I(inode)->phys_size = log_size; + HFS_I(inode)->fs_blocks = (log_size + sb->s_blocksize - 1) >> sb->s_blocksize_bits; diff --git a/queue-5.10/ipv6-take-care-of-scope-when-choosing-the-src-addr.patch b/queue-5.10/ipv6-take-care-of-scope-when-choosing-the-src-addr.patch new file mode 100644 index 00000000000..882a1e9542d --- /dev/null +++ b/queue-5.10/ipv6-take-care-of-scope-when-choosing-the-src-addr.patch @@ -0,0 +1,36 @@ +From abb9a68d2c64dd9b128ae1f2e635e4d805e7ce64 Mon Sep 17 00:00:00 2001 +From: Nicolas Dichtel +Date: Wed, 10 Jul 2024 10:14:29 +0200 +Subject: ipv6: take care of scope when choosing the src addr + +From: Nicolas Dichtel + +commit abb9a68d2c64dd9b128ae1f2e635e4d805e7ce64 upstream. + +When the source address is selected, the scope must be checked. For +example, if a loopback address is assigned to the vrf device, it must not +be chosen for packets sent outside. + +CC: stable@vger.kernel.org +Fixes: afbac6010aec ("net: ipv6: Address selection needs to consider L3 domains") +Signed-off-by: Nicolas Dichtel +Reviewed-by: David Ahern +Link: https://patch.msgid.link/20240710081521.3809742-4-nicolas.dichtel@6wind.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + net/ipv6/addrconf.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/net/ipv6/addrconf.c ++++ b/net/ipv6/addrconf.c +@@ -1822,7 +1822,8 @@ int ipv6_dev_get_saddr(struct net *net, + master, &dst, + scores, hiscore_idx); + +- if (scores[hiscore_idx].ifa) ++ if (scores[hiscore_idx].ifa && ++ scores[hiscore_idx].scopedist >= 0) + goto out; + } + diff --git a/queue-5.10/media-venus-fix-use-after-free-in-vdec_close.patch b/queue-5.10/media-venus-fix-use-after-free-in-vdec_close.patch new file mode 100644 index 00000000000..8497003af29 --- /dev/null +++ b/queue-5.10/media-venus-fix-use-after-free-in-vdec_close.patch @@ -0,0 +1,38 @@ +From a0157b5aa34eb43ec4c5510f9c260bbb03be937e Mon Sep 17 00:00:00 2001 +From: Dikshita Agarwal +Date: Thu, 9 May 2024 10:44:29 +0530 +Subject: media: venus: fix use after free in vdec_close + +From: Dikshita Agarwal + +commit a0157b5aa34eb43ec4c5510f9c260bbb03be937e upstream. + +There appears to be a possible use after free with vdec_close(). +The firmware will add buffer release work to the work queue through +HFI callbacks as a normal part of decoding. Randomly closing the +decoder device from userspace during normal decoding can incur +a read after free for inst. + +Fix it by cancelling the work in vdec_close. + +Cc: stable@vger.kernel.org +Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions") +Signed-off-by: Dikshita Agarwal +Acked-by: Vikash Garodia +Signed-off-by: Stanimir Varbanov +Signed-off-by: Hans Verkuil +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/platform/qcom/venus/vdec.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/media/platform/qcom/venus/vdec.c ++++ b/drivers/media/platform/qcom/venus/vdec.c +@@ -1587,6 +1587,7 @@ static int vdec_close(struct file *file) + + vdec_pm_get(inst); + ++ cancel_work_sync(&inst->delayed_process_work); + v4l2_m2m_ctx_release(inst->m2m_ctx); + v4l2_m2m_release(inst->m2m_dev); + vdec_ctrl_deinit(inst); diff --git a/queue-5.10/net-netconsole-disable-target-before-netpoll-cleanup.patch b/queue-5.10/net-netconsole-disable-target-before-netpoll-cleanup.patch new file mode 100644 index 00000000000..0cd3aa86573 --- /dev/null +++ b/queue-5.10/net-netconsole-disable-target-before-netpoll-cleanup.patch @@ -0,0 +1,52 @@ +From 97d9fba9a812cada5484667a46e14a4c976ca330 Mon Sep 17 00:00:00 2001 +From: Breno Leitao +Date: Fri, 12 Jul 2024 07:34:15 -0700 +Subject: net: netconsole: Disable target before netpoll cleanup + +From: Breno Leitao + +commit 97d9fba9a812cada5484667a46e14a4c976ca330 upstream. + +Currently, netconsole cleans up the netpoll structure before disabling +the target. This approach can lead to race conditions, as message +senders (write_ext_msg() and write_msg()) check if the target is +enabled before using netpoll. The sender can validate that the target is +enabled, but, the netpoll might be de-allocated already, causing +undesired behaviours. + +This patch reverses the order of operations: +1. Disable the target +2. Clean up the netpoll structure + +This change eliminates the potential race condition, ensuring that +no messages are sent through a partially cleaned-up netpoll structure. + +Fixes: 2382b15bcc39 ("netconsole: take care of NETDEV_UNREGISTER event") +Cc: stable@vger.kernel.org +Signed-off-by: Breno Leitao +Reviewed-by: Eric Dumazet +Link: https://patch.msgid.link/20240712143415.1141039-1-leitao@debian.org +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/netconsole.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/netconsole.c ++++ b/drivers/net/netconsole.c +@@ -715,6 +715,7 @@ restart: + /* rtnl_lock already held + * we might sleep in __netpoll_cleanup() + */ ++ nt->enabled = false; + spin_unlock_irqrestore(&target_list_lock, flags); + + __netpoll_cleanup(&nt->np); +@@ -722,7 +723,6 @@ restart: + spin_lock_irqsave(&target_list_lock, flags); + dev_put(nt->np.dev); + nt->np.dev = NULL; +- nt->enabled = false; + stopped = true; + netconsole_target_put(nt); + goto restart; diff --git a/queue-5.10/sched-fair-set_load_weight-must-also-call-reweight_task-for-sched_idle-tasks.patch b/queue-5.10/sched-fair-set_load_weight-must-also-call-reweight_task-for-sched_idle-tasks.patch new file mode 100644 index 00000000000..5da05bb2447 --- /dev/null +++ b/queue-5.10/sched-fair-set_load_weight-must-also-call-reweight_task-for-sched_idle-tasks.patch @@ -0,0 +1,107 @@ +From d329605287020c3d1c3b0dadc63d8208e7251382 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Tue, 25 Jun 2024 15:29:58 -1000 +Subject: sched/fair: set_load_weight() must also call reweight_task() for SCHED_IDLE tasks + +From: Tejun Heo + +commit d329605287020c3d1c3b0dadc63d8208e7251382 upstream. + +When a task's weight is being changed, set_load_weight() is called with +@update_load set. As weight changes aren't trivial for the fair class, +set_load_weight() calls fair.c::reweight_task() for fair class tasks. + +However, set_load_weight() first tests task_has_idle_policy() on entry and +skips calling reweight_task() for SCHED_IDLE tasks. This is buggy as +SCHED_IDLE tasks are just fair tasks with a very low weight and they would +incorrectly skip load, vlag and position updates. + +Fix it by updating reweight_task() to take struct load_weight as idle weight +can't be expressed with prio and making set_load_weight() call +reweight_task() for SCHED_IDLE tasks too when @update_load is set. + +Fixes: 9059393e4ec1 ("sched/fair: Use reweight_entity() for set_user_nice()") +Suggested-by: Peter Zijlstra (Intel) +Signed-off-by: Tejun Heo +Signed-off-by: Peter Zijlstra (Intel) +Cc: stable@vger.kernel.org # v4.15+ +Link: http://lkml.kernel.org/r/20240624102331.GI31592@noisy.programming.kicks-ass.net +Signed-off-by: Greg Kroah-Hartman +--- + kernel/sched/core.c | 23 ++++++++++------------- + kernel/sched/fair.c | 7 +++---- + kernel/sched/sched.h | 2 +- + 3 files changed, 14 insertions(+), 18 deletions(-) + +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -848,27 +848,24 @@ static void set_load_weight(struct task_ + { + bool update_load = !(READ_ONCE(p->state) & TASK_NEW); + int prio = p->static_prio - MAX_RT_PRIO; +- struct load_weight *load = &p->se.load; ++ struct load_weight lw; + +- /* +- * SCHED_IDLE tasks get minimal weight: +- */ + if (task_has_idle_policy(p)) { +- load->weight = scale_load(WEIGHT_IDLEPRIO); +- load->inv_weight = WMULT_IDLEPRIO; +- return; ++ lw.weight = scale_load(WEIGHT_IDLEPRIO); ++ lw.inv_weight = WMULT_IDLEPRIO; ++ } else { ++ lw.weight = scale_load(sched_prio_to_weight[prio]); ++ lw.inv_weight = sched_prio_to_wmult[prio]; + } + + /* + * SCHED_OTHER tasks have to update their load when changing their + * weight + */ +- if (update_load && p->sched_class == &fair_sched_class) { +- reweight_task(p, prio); +- } else { +- load->weight = scale_load(sched_prio_to_weight[prio]); +- load->inv_weight = sched_prio_to_wmult[prio]; +- } ++ if (update_load && p->sched_class == &fair_sched_class) ++ reweight_task(p, &lw); ++ else ++ p->se.load = lw; + } + + #ifdef CONFIG_UCLAMP_TASK +--- a/kernel/sched/fair.c ++++ b/kernel/sched/fair.c +@@ -3119,15 +3119,14 @@ static void reweight_entity(struct cfs_r + + } + +-void reweight_task(struct task_struct *p, int prio) ++void reweight_task(struct task_struct *p, const struct load_weight *lw) + { + struct sched_entity *se = &p->se; + struct cfs_rq *cfs_rq = cfs_rq_of(se); + struct load_weight *load = &se->load; +- unsigned long weight = scale_load(sched_prio_to_weight[prio]); + +- reweight_entity(cfs_rq, se, weight); +- load->inv_weight = sched_prio_to_wmult[prio]; ++ reweight_entity(cfs_rq, se, lw->weight); ++ load->inv_weight = lw->inv_weight; + } + + #ifdef CONFIG_FAIR_GROUP_SCHED +--- a/kernel/sched/sched.h ++++ b/kernel/sched/sched.h +@@ -1938,7 +1938,7 @@ extern void init_sched_dl_class(void); + extern void init_sched_rt_class(void); + extern void init_sched_fair_class(void); + +-extern void reweight_task(struct task_struct *p, int prio); ++extern void reweight_task(struct task_struct *p, const struct load_weight *lw); + + extern void resched_curr(struct rq *rq); + extern void resched_cpu(int cpu); diff --git a/queue-5.10/series b/queue-5.10/series index 6c6fcf861f3..9175a1ff5b2 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -122,3 +122,15 @@ fs-proc-task_mmu-indicate-pm_file-for-pmd-mapped-fil.patch fs-nilfs2-remove-some-unused-macros-to-tame-gcc.patch nilfs2-avoid-undefined-behavior-in-nilfs_cnt32_ge-ma.patch rtc-interface-add-rtc-offset-to-alarm-after-fix-up.patch +dt-bindings-thermal-correct-thermal-zone-node-name-limit.patch +tick-broadcast-make-takeover-of-broadcast-hrtimer-reliable.patch +net-netconsole-disable-target-before-netpoll-cleanup.patch +af_packet-handle-outgoing-vlan-packets-without-hardware-offloading.patch +ipv6-take-care-of-scope-when-choosing-the-src-addr.patch +sched-fair-set_load_weight-must-also-call-reweight_task-for-sched_idle-tasks.patch +char-tpm-fix-possible-memory-leak-in-tpm_bios_measurements_open.patch +media-venus-fix-use-after-free-in-vdec_close.patch +hfs-fix-to-initialize-fields-of-hfs_inode_info-after-hfs_alloc_inode.patch +ext2-verify-bitmap-and-itable-block-numbers-before-using-them.patch +drm-gma500-fix-null-pointer-dereference-in-cdv_intel_lvds_get_modes.patch +drm-gma500-fix-null-pointer-dereference-in-psb_intel_lvds_get_modes.patch diff --git a/queue-5.10/tick-broadcast-make-takeover-of-broadcast-hrtimer-reliable.patch b/queue-5.10/tick-broadcast-make-takeover-of-broadcast-hrtimer-reliable.patch new file mode 100644 index 00000000000..b845121240d --- /dev/null +++ b/queue-5.10/tick-broadcast-make-takeover-of-broadcast-hrtimer-reliable.patch @@ -0,0 +1,109 @@ +From f7d43dd206e7e18c182f200e67a8db8c209907fa Mon Sep 17 00:00:00 2001 +From: Yu Liao +Date: Thu, 11 Jul 2024 20:48:43 +0800 +Subject: tick/broadcast: Make takeover of broadcast hrtimer reliable + +From: Yu Liao + +commit f7d43dd206e7e18c182f200e67a8db8c209907fa upstream. + +Running the LTP hotplug stress test on a aarch64 machine results in +rcu_sched stall warnings when the broadcast hrtimer was owned by the +un-plugged CPU. The issue is the following: + +CPU1 (owns the broadcast hrtimer) CPU2 + + tick_broadcast_enter() + // shutdown local timer device + broadcast_shutdown_local() + ... + tick_broadcast_exit() + clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT) + // timer device is not programmed + cpumask_set_cpu(cpu, tick_broadcast_force_mask) + + initiates offlining of CPU1 +take_cpu_down() +/* + * CPU1 shuts down and does not + * send broadcast IPI anymore + */ + takedown_cpu() + hotplug_cpu__broadcast_tick_pull() + // move broadcast hrtimer to this CPU + clockevents_program_event() + bc_set_next() + hrtimer_start() + /* + * timer device is not programmed + * because only the first expiring + * timer will trigger clockevent + * device reprogramming + */ + +What happens is that CPU2 exits broadcast mode with force bit set, then the +local timer device is not reprogrammed and CPU2 expects to receive the +expired event by the broadcast IPI. But this does not happen because CPU1 +is offlined by CPU2. CPU switches the clockevent device to ONESHOT state, +but does not reprogram the device. + +The subsequent reprogramming of the hrtimer broadcast device does not +program the clockevent device of CPU2 either because the pending expiry +time is already in the past and the CPU expects the event to be delivered. +As a consequence all CPUs which wait for a broadcast event to be delivered +are stuck forever. + +Fix this issue by reprogramming the local timer device if the broadcast +force bit of the CPU is set so that the broadcast hrtimer is delivered. + +[ tglx: Massage comment and change log. Add Fixes tag ] + +Fixes: 989dcb645ca7 ("tick: Handle broadcast wakeup of multiple cpus") +Signed-off-by: Yu Liao +Signed-off-by: Thomas Gleixner +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20240711124843.64167-1-liaoyu15@huawei.com +Signed-off-by: Greg Kroah-Hartman +--- + kernel/time/tick-broadcast.c | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +--- a/kernel/time/tick-broadcast.c ++++ b/kernel/time/tick-broadcast.c +@@ -944,6 +944,7 @@ void tick_broadcast_switch_to_oneshot(vo + #ifdef CONFIG_HOTPLUG_CPU + void hotplug_cpu__broadcast_tick_pull(int deadcpu) + { ++ struct tick_device *td = this_cpu_ptr(&tick_cpu_device); + struct clock_event_device *bc; + unsigned long flags; + +@@ -951,6 +952,28 @@ void hotplug_cpu__broadcast_tick_pull(in + bc = tick_broadcast_device.evtdev; + + if (bc && broadcast_needs_cpu(bc, deadcpu)) { ++ /* ++ * If the broadcast force bit of the current CPU is set, ++ * then the current CPU has not yet reprogrammed the local ++ * timer device to avoid a ping-pong race. See ++ * ___tick_broadcast_oneshot_control(). ++ * ++ * If the broadcast device is hrtimer based then ++ * programming the broadcast event below does not have any ++ * effect because the local clockevent device is not ++ * running and not programmed because the broadcast event ++ * is not earlier than the pending event of the local clock ++ * event device. As a consequence all CPUs waiting for a ++ * broadcast event are stuck forever. ++ * ++ * Detect this condition and reprogram the cpu local timer ++ * device to avoid the starvation. ++ */ ++ if (tick_check_broadcast_expired()) { ++ cpumask_clear_cpu(smp_processor_id(), tick_broadcast_force_mask); ++ tick_program_event(td->evtdev->next_event, 1); ++ } ++ + /* This moves the broadcast assignment to this CPU: */ + clockevents_program_event(bc, bc->next_event, 1); + } -- 2.47.3