From: Sasha Levin Date: Sun, 18 Feb 2024 16:39:35 +0000 (-0500) Subject: Fixes for 5.10 X-Git-Tag: v4.19.307~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c880ffb81026b75502e6027f5a5c9a29a91638c;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.10 Signed-off-by: Sasha Levin --- diff --git a/queue-5.10/asoc-rt5645-fix-deadlock-in-rt5645_jack_detect_work.patch b/queue-5.10/asoc-rt5645-fix-deadlock-in-rt5645_jack_detect_work.patch new file mode 100644 index 00000000000..b6afe2200a0 --- /dev/null +++ b/queue-5.10/asoc-rt5645-fix-deadlock-in-rt5645_jack_detect_work.patch @@ -0,0 +1,39 @@ +From ba034ce6ee92a69a689d4360c413c0d3dcb1b3b3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 11 Feb 2024 12:58:34 +0300 +Subject: ASoC: rt5645: Fix deadlock in rt5645_jack_detect_work() + +From: Alexey Khoroshilov + +[ Upstream commit 6ef5d5b92f7117b324efaac72b3db27ae8bb3082 ] + +There is a path in rt5645_jack_detect_work(), where rt5645->jd_mutex +is left locked forever. That may lead to deadlock +when rt5645_jack_detect_work() is called for the second time. + +Found by Linux Verification Center (linuxtesting.org) with SVACE. + +Fixes: cdba4301adda ("ASoC: rt5650: add mutex to avoid the jack detection failure") +Signed-off-by: Alexey Khoroshilov +Link: https://lore.kernel.org/r/1707645514-21196-1-git-send-email-khoroshilov@ispras.ru +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/codecs/rt5645.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c +index 7dc80183921e..04457cbed5b4 100644 +--- a/sound/soc/codecs/rt5645.c ++++ b/sound/soc/codecs/rt5645.c +@@ -3276,6 +3276,7 @@ static void rt5645_jack_detect_work(struct work_struct *work) + report, SND_JACK_HEADPHONE); + snd_soc_jack_report(rt5645->mic_jack, + report, SND_JACK_MICROPHONE); ++ mutex_unlock(&rt5645->jd_mutex); + return; + case 4: + val = snd_soc_component_read(rt5645->component, RT5645_A_JD_CTRL1) & 0x0020; +-- +2.43.0 + diff --git a/queue-5.10/i40e-fix-waiting-for-queues-of-all-vsis-to-be-disabl.patch b/queue-5.10/i40e-fix-waiting-for-queues-of-all-vsis-to-be-disabl.patch new file mode 100644 index 00000000000..fca1b95c838 --- /dev/null +++ b/queue-5.10/i40e-fix-waiting-for-queues-of-all-vsis-to-be-disabl.patch @@ -0,0 +1,41 @@ +From b7082d564d3e8bbad4a2272219ed0810ee067de4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 8 Nov 2023 17:01:03 +0100 +Subject: i40e: Fix waiting for queues of all VSIs to be disabled + +From: Ivan Vecera + +[ Upstream commit c73729b64bb692186da080602cd13612783f52ac ] + +The function i40e_pf_wait_queues_disabled() iterates all PF's VSIs +up to 'pf->hw.func_caps.num_vsis' but this is incorrect because +the real number of VSIs can be up to 'pf->num_alloc_vsi' that +can be higher. Fix this loop. + +Fixes: 69129dc39fac ("i40e: Modify Tx disable wait flow in case of DCB reconfiguration") +Signed-off-by: Ivan Vecera +Reviewed-by: Jacob Keller +Reviewed-by: Wojciech Drewek +Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) +Signed-off-by: Tony Nguyen +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c +index d83b96aa3e42..135acd74497f 100644 +--- a/drivers/net/ethernet/intel/i40e/i40e_main.c ++++ b/drivers/net/ethernet/intel/i40e/i40e_main.c +@@ -5153,7 +5153,7 @@ static int i40e_pf_wait_queues_disabled(struct i40e_pf *pf) + { + int v, ret = 0; + +- for (v = 0; v < pf->hw.func_caps.num_vsis; v++) { ++ for (v = 0; v < pf->num_alloc_vsi; v++) { + if (pf->vsi[v]) { + ret = i40e_vsi_wait_queues_disabled(pf->vsi[v]); + if (ret) +-- +2.43.0 + diff --git a/queue-5.10/mips-add-memory-clobber-to-csum_ipv6_magic-inline-as.patch b/queue-5.10/mips-add-memory-clobber-to-csum_ipv6_magic-inline-as.patch new file mode 100644 index 00000000000..d5e78baf99c --- /dev/null +++ b/queue-5.10/mips-add-memory-clobber-to-csum_ipv6_magic-inline-as.patch @@ -0,0 +1,54 @@ +From 2a0ccd408a27833cccf829dd4bcb024071b9fd10 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 11 Feb 2024 08:08:37 -0800 +Subject: MIPS: Add 'memory' clobber to csum_ipv6_magic() inline assembler + +From: Guenter Roeck + +[ Upstream commit d55347bfe4e66dce2e1e7501e5492f4af3e315f8 ] + +After 'lib: checksum: Use aligned accesses for ip_fast_csum and +csum_ipv6_magic tests' was applied, the test_csum_ipv6_magic unit test +started failing for all mips platforms, both little and bit endian. +Oddly enough, adding debug code into test_csum_ipv6_magic() made the +problem disappear. + +The gcc manual says: + +"The "memory" clobber tells the compiler that the assembly code performs + memory reads or writes to items other than those listed in the input + and output operands (for example, accessing the memory pointed to by one + of the input parameters) +" + +This is definitely the case for csum_ipv6_magic(). Indeed, adding the +'memory' clobber fixes the problem. + +Cc: Charlie Jenkins +Cc: Palmer Dabbelt +Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") +Signed-off-by: Guenter Roeck +Reviewed-by: Charlie Jenkins +Signed-off-by: Thomas Bogendoerfer +Signed-off-by: Sasha Levin +--- + arch/mips/include/asm/checksum.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/mips/include/asm/checksum.h b/arch/mips/include/asm/checksum.h +index 5f80c28f5253..6c837a256cf6 100644 +--- a/arch/mips/include/asm/checksum.h ++++ b/arch/mips/include/asm/checksum.h +@@ -242,7 +242,8 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, + " .set pop" + : "=&r" (sum), "=&r" (tmp) + : "r" (saddr), "r" (daddr), +- "0" (htonl(len)), "r" (htonl(proto)), "r" (sum)); ++ "0" (htonl(len)), "r" (htonl(proto)), "r" (sum) ++ : "memory"); + + return csum_fold(sum); + } +-- +2.43.0 + diff --git a/queue-5.10/net-openvswitch-limit-the-number-of-recursions-from-.patch b/queue-5.10/net-openvswitch-limit-the-number-of-recursions-from-.patch new file mode 100644 index 00000000000..7deeba01ec0 --- /dev/null +++ b/queue-5.10/net-openvswitch-limit-the-number-of-recursions-from-.patch @@ -0,0 +1,214 @@ +From abdd65cbdb3e99f707fe5eb868412a8ec81a4747 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 7 Feb 2024 08:24:15 -0500 +Subject: net: openvswitch: limit the number of recursions from action sets + +From: Aaron Conole + +[ Upstream commit 6e2f90d31fe09f2b852de25125ca875aabd81367 ] + +The ovs module allows for some actions to recursively contain an action +list for complex scenarios, such as sampling, checking lengths, etc. +When these actions are copied into the internal flow table, they are +evaluated to validate that such actions make sense, and these calls +happen recursively. + +The ovs-vswitchd userspace won't emit more than 16 recursion levels +deep. However, the module has no such limit and will happily accept +limits larger than 16 levels nested. Prevent this by tracking the +number of recursions happening and manually limiting it to 16 levels +nested. + +The initial implementation of the sample action would track this depth +and prevent more than 3 levels of recursion, but this was removed to +support the clone use case, rather than limited at the current userspace +limit. + +Fixes: 798c166173ff ("openvswitch: Optimize sample action for the clone use cases") +Signed-off-by: Aaron Conole +Reviewed-by: Simon Horman +Link: https://lore.kernel.org/r/20240207132416.1488485-2-aconole@redhat.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + net/openvswitch/flow_netlink.c | 49 +++++++++++++++++++++++----------- + 1 file changed, 33 insertions(+), 16 deletions(-) + +diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c +index 293a798e89f4..cff18a5bbf38 100644 +--- a/net/openvswitch/flow_netlink.c ++++ b/net/openvswitch/flow_netlink.c +@@ -47,6 +47,7 @@ struct ovs_len_tbl { + + #define OVS_ATTR_NESTED -1 + #define OVS_ATTR_VARIABLE -2 ++#define OVS_COPY_ACTIONS_MAX_DEPTH 16 + + static bool actions_may_change_flow(const struct nlattr *actions) + { +@@ -2514,13 +2515,15 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, + const struct sw_flow_key *key, + struct sw_flow_actions **sfa, + __be16 eth_type, __be16 vlan_tci, +- u32 mpls_label_count, bool log); ++ u32 mpls_label_count, bool log, ++ u32 depth); + + static int validate_and_copy_sample(struct net *net, const struct nlattr *attr, + const struct sw_flow_key *key, + struct sw_flow_actions **sfa, + __be16 eth_type, __be16 vlan_tci, +- u32 mpls_label_count, bool log, bool last) ++ u32 mpls_label_count, bool log, bool last, ++ u32 depth) + { + const struct nlattr *attrs[OVS_SAMPLE_ATTR_MAX + 1]; + const struct nlattr *probability, *actions; +@@ -2571,7 +2574,8 @@ static int validate_and_copy_sample(struct net *net, const struct nlattr *attr, + return err; + + err = __ovs_nla_copy_actions(net, actions, key, sfa, +- eth_type, vlan_tci, mpls_label_count, log); ++ eth_type, vlan_tci, mpls_label_count, log, ++ depth + 1); + + if (err) + return err; +@@ -2586,7 +2590,8 @@ static int validate_and_copy_dec_ttl(struct net *net, + const struct sw_flow_key *key, + struct sw_flow_actions **sfa, + __be16 eth_type, __be16 vlan_tci, +- u32 mpls_label_count, bool log) ++ u32 mpls_label_count, bool log, ++ u32 depth) + { + const struct nlattr *attrs[OVS_DEC_TTL_ATTR_MAX + 1]; + int start, action_start, err, rem; +@@ -2619,7 +2624,8 @@ static int validate_and_copy_dec_ttl(struct net *net, + return action_start; + + err = __ovs_nla_copy_actions(net, actions, key, sfa, eth_type, +- vlan_tci, mpls_label_count, log); ++ vlan_tci, mpls_label_count, log, ++ depth + 1); + if (err) + return err; + +@@ -2633,7 +2639,8 @@ static int validate_and_copy_clone(struct net *net, + const struct sw_flow_key *key, + struct sw_flow_actions **sfa, + __be16 eth_type, __be16 vlan_tci, +- u32 mpls_label_count, bool log, bool last) ++ u32 mpls_label_count, bool log, bool last, ++ u32 depth) + { + int start, err; + u32 exec; +@@ -2653,7 +2660,8 @@ static int validate_and_copy_clone(struct net *net, + return err; + + err = __ovs_nla_copy_actions(net, attr, key, sfa, +- eth_type, vlan_tci, mpls_label_count, log); ++ eth_type, vlan_tci, mpls_label_count, log, ++ depth + 1); + if (err) + return err; + +@@ -3022,7 +3030,7 @@ static int validate_and_copy_check_pkt_len(struct net *net, + struct sw_flow_actions **sfa, + __be16 eth_type, __be16 vlan_tci, + u32 mpls_label_count, +- bool log, bool last) ++ bool log, bool last, u32 depth) + { + const struct nlattr *acts_if_greater, *acts_if_lesser_eq; + struct nlattr *a[OVS_CHECK_PKT_LEN_ATTR_MAX + 1]; +@@ -3070,7 +3078,8 @@ static int validate_and_copy_check_pkt_len(struct net *net, + return nested_acts_start; + + err = __ovs_nla_copy_actions(net, acts_if_lesser_eq, key, sfa, +- eth_type, vlan_tci, mpls_label_count, log); ++ eth_type, vlan_tci, mpls_label_count, log, ++ depth + 1); + + if (err) + return err; +@@ -3083,7 +3092,8 @@ static int validate_and_copy_check_pkt_len(struct net *net, + return nested_acts_start; + + err = __ovs_nla_copy_actions(net, acts_if_greater, key, sfa, +- eth_type, vlan_tci, mpls_label_count, log); ++ eth_type, vlan_tci, mpls_label_count, log, ++ depth + 1); + + if (err) + return err; +@@ -3111,12 +3121,16 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, + const struct sw_flow_key *key, + struct sw_flow_actions **sfa, + __be16 eth_type, __be16 vlan_tci, +- u32 mpls_label_count, bool log) ++ u32 mpls_label_count, bool log, ++ u32 depth) + { + u8 mac_proto = ovs_key_mac_proto(key); + const struct nlattr *a; + int rem, err; + ++ if (depth > OVS_COPY_ACTIONS_MAX_DEPTH) ++ return -EOVERFLOW; ++ + nla_for_each_nested(a, attr, rem) { + /* Expected argument lengths, (u32)-1 for variable length. */ + static const u32 action_lens[OVS_ACTION_ATTR_MAX + 1] = { +@@ -3311,7 +3325,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, + err = validate_and_copy_sample(net, a, key, sfa, + eth_type, vlan_tci, + mpls_label_count, +- log, last); ++ log, last, depth); + if (err) + return err; + skip_copy = true; +@@ -3382,7 +3396,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, + err = validate_and_copy_clone(net, a, key, sfa, + eth_type, vlan_tci, + mpls_label_count, +- log, last); ++ log, last, depth); + if (err) + return err; + skip_copy = true; +@@ -3396,7 +3410,8 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, + eth_type, + vlan_tci, + mpls_label_count, +- log, last); ++ log, last, ++ depth); + if (err) + return err; + skip_copy = true; +@@ -3406,7 +3421,8 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, + case OVS_ACTION_ATTR_DEC_TTL: + err = validate_and_copy_dec_ttl(net, a, key, sfa, + eth_type, vlan_tci, +- mpls_label_count, log); ++ mpls_label_count, log, ++ depth); + if (err) + return err; + skip_copy = true; +@@ -3446,7 +3462,8 @@ int ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, + + (*sfa)->orig_len = nla_len(attr); + err = __ovs_nla_copy_actions(net, attr, key, sfa, key->eth.type, +- key->eth.vlan.tci, mpls_label_count, log); ++ key->eth.vlan.tci, mpls_label_count, log, ++ 0); + if (err) + ovs_nla_free_flow_actions(*sfa); + +-- +2.43.0 + diff --git a/queue-5.10/net-sysfs-fix-sys-class-net-iface-path-for-statistic.patch b/queue-5.10/net-sysfs-fix-sys-class-net-iface-path-for-statistic.patch new file mode 100644 index 00000000000..56feeaf7da6 --- /dev/null +++ b/queue-5.10/net-sysfs-fix-sys-class-net-iface-path-for-statistic.patch @@ -0,0 +1,244 @@ +From e43cfdb3402ccf5c65f7d39389ae9109d243c9b6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 9 Feb 2024 01:55:18 -0800 +Subject: net: sysfs: Fix /sys/class/net/ path for statistics + +From: Breno Leitao + +[ Upstream commit 5b3fbd61b9d1f4ed2db95aaf03f9adae0373784d ] + +The Documentation/ABI/testing/sysfs-class-net-statistics documentation +is pointing to the wrong path for the interface. Documentation is +pointing to /sys/class/, instead of /sys/class/net/. + +Fix it by adding the `net/` directory before the interface. + +Fixes: 6044f9700645 ("net: sysfs: document /sys/class/net/statistics/*") +Signed-off-by: Breno Leitao +Reviewed-by: Andrew Lunn +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + .../ABI/testing/sysfs-class-net-statistics | 48 +++++++++---------- + 1 file changed, 24 insertions(+), 24 deletions(-) + +diff --git a/Documentation/ABI/testing/sysfs-class-net-statistics b/Documentation/ABI/testing/sysfs-class-net-statistics +index 55db27815361..53e508c6936a 100644 +--- a/Documentation/ABI/testing/sysfs-class-net-statistics ++++ b/Documentation/ABI/testing/sysfs-class-net-statistics +@@ -1,4 +1,4 @@ +-What: /sys/class//statistics/collisions ++What: /sys/class/net//statistics/collisions + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -6,7 +6,7 @@ Description: + Indicates the number of collisions seen by this network device. + This value might not be relevant with all MAC layers. + +-What: /sys/class//statistics/multicast ++What: /sys/class/net//statistics/multicast + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -14,7 +14,7 @@ Description: + Indicates the number of multicast packets received by this + network device. + +-What: /sys/class//statistics/rx_bytes ++What: /sys/class/net//statistics/rx_bytes + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -23,7 +23,7 @@ Description: + See the network driver for the exact meaning of when this + value is incremented. + +-What: /sys/class//statistics/rx_compressed ++What: /sys/class/net//statistics/rx_compressed + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -32,7 +32,7 @@ Description: + network device. This value might only be relevant for interfaces + that support packet compression (e.g: PPP). + +-What: /sys/class//statistics/rx_crc_errors ++What: /sys/class/net//statistics/rx_crc_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -41,7 +41,7 @@ Description: + by this network device. Note that the specific meaning might + depend on the MAC layer used by the interface. + +-What: /sys/class//statistics/rx_dropped ++What: /sys/class/net//statistics/rx_dropped + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -51,7 +51,7 @@ Description: + packet processing. See the network driver for the exact + meaning of this value. + +-What: /sys/class//statistics/rx_errors ++What: /sys/class/net//statistics/rx_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -59,7 +59,7 @@ Description: + Indicates the number of receive errors on this network device. + See the network driver for the exact meaning of this value. + +-What: /sys/class//statistics/rx_fifo_errors ++What: /sys/class/net//statistics/rx_fifo_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -68,7 +68,7 @@ Description: + network device. See the network driver for the exact + meaning of this value. + +-What: /sys/class//statistics/rx_frame_errors ++What: /sys/class/net//statistics/rx_frame_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -78,7 +78,7 @@ Description: + on the MAC layer protocol used. See the network driver for + the exact meaning of this value. + +-What: /sys/class//statistics/rx_length_errors ++What: /sys/class/net//statistics/rx_length_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -87,7 +87,7 @@ Description: + error, oversized or undersized. See the network driver for the + exact meaning of this value. + +-What: /sys/class//statistics/rx_missed_errors ++What: /sys/class/net//statistics/rx_missed_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -96,7 +96,7 @@ Description: + due to lack of capacity in the receive side. See the network + driver for the exact meaning of this value. + +-What: /sys/class//statistics/rx_nohandler ++What: /sys/class/net//statistics/rx_nohandler + Date: February 2016 + KernelVersion: 4.6 + Contact: netdev@vger.kernel.org +@@ -104,7 +104,7 @@ Description: + Indicates the number of received packets that were dropped on + an inactive device by the network core. + +-What: /sys/class//statistics/rx_over_errors ++What: /sys/class/net//statistics/rx_over_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -114,7 +114,7 @@ Description: + (e.g: larger than MTU). See the network driver for the exact + meaning of this value. + +-What: /sys/class//statistics/rx_packets ++What: /sys/class/net//statistics/rx_packets + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -122,7 +122,7 @@ Description: + Indicates the total number of good packets received by this + network device. + +-What: /sys/class//statistics/tx_aborted_errors ++What: /sys/class/net//statistics/tx_aborted_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -132,7 +132,7 @@ Description: + a medium collision). See the network driver for the exact + meaning of this value. + +-What: /sys/class//statistics/tx_bytes ++What: /sys/class/net//statistics/tx_bytes + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -143,7 +143,7 @@ Description: + transmitted packets or all packets that have been queued for + transmission. + +-What: /sys/class//statistics/tx_carrier_errors ++What: /sys/class/net//statistics/tx_carrier_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -152,7 +152,7 @@ Description: + because of carrier errors (e.g: physical link down). See the + network driver for the exact meaning of this value. + +-What: /sys/class//statistics/tx_compressed ++What: /sys/class/net//statistics/tx_compressed + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -161,7 +161,7 @@ Description: + this might only be relevant for devices that support + compression (e.g: PPP). + +-What: /sys/class//statistics/tx_dropped ++What: /sys/class/net//statistics/tx_dropped + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -170,7 +170,7 @@ Description: + See the driver for the exact reasons as to why the packets were + dropped. + +-What: /sys/class//statistics/tx_errors ++What: /sys/class/net//statistics/tx_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -179,7 +179,7 @@ Description: + a network device. See the driver for the exact reasons as to + why the packets were dropped. + +-What: /sys/class//statistics/tx_fifo_errors ++What: /sys/class/net//statistics/tx_fifo_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -188,7 +188,7 @@ Description: + FIFO error. See the driver for the exact reasons as to why the + packets were dropped. + +-What: /sys/class//statistics/tx_heartbeat_errors ++What: /sys/class/net//statistics/tx_heartbeat_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -197,7 +197,7 @@ Description: + reported as heartbeat errors. See the driver for the exact + reasons as to why the packets were dropped. + +-What: /sys/class//statistics/tx_packets ++What: /sys/class/net//statistics/tx_packets + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +@@ -206,7 +206,7 @@ Description: + device. See the driver for whether this reports the number of all + attempted or successful transmissions. + +-What: /sys/class//statistics/tx_window_errors ++What: /sys/class/net//statistics/tx_window_errors + Date: April 2005 + KernelVersion: 2.6.12 + Contact: netdev@vger.kernel.org +-- +2.43.0 + diff --git a/queue-5.10/of-unittest-fix-compile-in-the-non-dynamic-case.patch b/queue-5.10/of-unittest-fix-compile-in-the-non-dynamic-case.patch new file mode 100644 index 00000000000..d65b15a36fb --- /dev/null +++ b/queue-5.10/of-unittest-fix-compile-in-the-non-dynamic-case.patch @@ -0,0 +1,68 @@ +From 20fafafc86cc685ec3aacbf4969ded228f7c8ec9 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 29 Jan 2024 20:25:56 +0100 +Subject: of: unittest: Fix compile in the non-dynamic case + +From: Christian A. Ehrhardt + +[ Upstream commit 607aad1e4356c210dbef9022955a3089377909b2 ] + +If CONFIG_OF_KOBJ is not set, a device_node does not contain a +kobj and attempts to access the embedded kobj via kref_read break +the compile. + +Replace affected kref_read calls with a macro that reads the +refcount if it exists and returns 1 if there is no embedded kobj. + +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-kbuild-all/202401291740.VP219WIz-lkp@intel.com/ +Fixes: 4dde83569832 ("of: Fix double free in of_parse_phandle_with_args_map") +Signed-off-by: Christian A. Ehrhardt +Link: https://lore.kernel.org/r/20240129192556.403271-1-lk@c--e.de +Signed-off-by: Rob Herring +Signed-off-by: Sasha Levin +--- + drivers/of/unittest.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c +index f9083c868a36..a334c68db339 100644 +--- a/drivers/of/unittest.c ++++ b/drivers/of/unittest.c +@@ -48,6 +48,12 @@ static struct unittest_results { + failed; \ + }) + ++#ifdef CONFIG_OF_KOBJ ++#define OF_KREF_READ(NODE) kref_read(&(NODE)->kobj.kref) ++#else ++#define OF_KREF_READ(NODE) 1 ++#endif ++ + /* + * Expected message may have a message level other than KERN_INFO. + * Print the expected message only if the current loglevel will allow +@@ -561,7 +567,7 @@ static void __init of_unittest_parse_phandle_with_args_map(void) + pr_err("missing testcase data\n"); + return; + } +- prefs[i] = kref_read(&p[i]->kobj.kref); ++ prefs[i] = OF_KREF_READ(p[i]); + } + + rc = of_count_phandle_with_args(np, "phandle-list", "#phandle-cells"); +@@ -684,9 +690,9 @@ static void __init of_unittest_parse_phandle_with_args_map(void) + unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); + + for (i = 0; i < ARRAY_SIZE(p); ++i) { +- unittest(prefs[i] == kref_read(&p[i]->kobj.kref), ++ unittest(prefs[i] == OF_KREF_READ(p[i]), + "provider%d: expected:%d got:%d\n", +- i, prefs[i], kref_read(&p[i]->kobj.kref)); ++ i, prefs[i], OF_KREF_READ(p[i])); + of_node_put(p[i]); + } + } +-- +2.43.0 + diff --git a/queue-5.10/series b/queue-5.10/series index df93b2af377..b42cbbcf99f 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -288,3 +288,10 @@ btrfs-forbid-creating-subvol-qgroups.patch btrfs-do-not-assert-if-the-newly-created-subvolume-already-got-read.patch btrfs-forbid-deleting-live-subvol-qgroup.patch btrfs-send-return-eopnotsupp-on-unknown-flags.patch +of-unittest-fix-compile-in-the-non-dynamic-case.patch +net-openvswitch-limit-the-number-of-recursions-from-.patch +spi-ppc4xx-drop-write-only-variable.patch +asoc-rt5645-fix-deadlock-in-rt5645_jack_detect_work.patch +net-sysfs-fix-sys-class-net-iface-path-for-statistic.patch +mips-add-memory-clobber-to-csum_ipv6_magic-inline-as.patch +i40e-fix-waiting-for-queues-of-all-vsis-to-be-disabl.patch diff --git a/queue-5.10/spi-ppc4xx-drop-write-only-variable.patch b/queue-5.10/spi-ppc4xx-drop-write-only-variable.patch new file mode 100644 index 00000000000..ab42faaeabc --- /dev/null +++ b/queue-5.10/spi-ppc4xx-drop-write-only-variable.patch @@ -0,0 +1,55 @@ +From d24f930e2dd8c665aa9ece1efef5a0fc1dc15f3d Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 10 Feb 2024 17:40:08 +0100 +Subject: spi: ppc4xx: Drop write-only variable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Uwe Kleine-König + +[ Upstream commit b3aa619a8b4706f35cb62f780c14e68796b37f3f ] + +Since commit 24778be20f87 ("spi: convert drivers to use +bits_per_word_mask") the bits_per_word variable is only written to. The +check that was there before isn't needed any more as the spi core +ensures that only 8 bit transfers are used, so the variable can go away +together with all assignments to it. + +Fixes: 24778be20f87 ("spi: convert drivers to use bits_per_word_mask") +Signed-off-by: Uwe Kleine-König +Link: https://lore.kernel.org/r/20240210164006.208149-8-u.kleine-koenig@pengutronix.de +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + drivers/spi/spi-ppc4xx.c | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c +index d8ee363fb714..4200b12fc347 100644 +--- a/drivers/spi/spi-ppc4xx.c ++++ b/drivers/spi/spi-ppc4xx.c +@@ -166,10 +166,8 @@ static int spi_ppc4xx_setupxfer(struct spi_device *spi, struct spi_transfer *t) + int scr; + u8 cdm = 0; + u32 speed; +- u8 bits_per_word; + + /* Start with the generic configuration for this device. */ +- bits_per_word = spi->bits_per_word; + speed = spi->max_speed_hz; + + /* +@@ -177,9 +175,6 @@ static int spi_ppc4xx_setupxfer(struct spi_device *spi, struct spi_transfer *t) + * the transfer to overwrite the generic configuration with zeros. + */ + if (t) { +- if (t->bits_per_word) +- bits_per_word = t->bits_per_word; +- + if (t->speed_hz) + speed = min(t->speed_hz, spi->max_speed_hz); + } +-- +2.43.0 +