6.5.7-rc1 review
Subsystems (8)
Greg Kroah-Hartman
maintainerPATCH 123/163 ipv4: Set offload_failed flag in fibmatch results
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Poirier <[email protected]>
[ Upstream commit 0add5c597f3253a9c6108a0a81d57f44ab0d9d30 ]
Due to a small omission, the offload_failed flag is missing from ipv4 fibmatch results. Make sure it is set correctly.
The issue can be witnessed using the following commands:
echo "1 1" > /sys/bus/netdevsim/new_device
ip link add dummy1 up type dummy
ip route add 192.0.2.0/24 dev dummy1
echo 1 > /sys/kernel/debug/netdevsim/netdevsim1/fib/fail_route_offload ip route add 198.51.100.0/24 dev dummy1
ip route
# 192.168.15.0/24 has rt_trap # 198.51.100.0/24 has rt_offload_failed
ip route get 192.168.15.1 fibmatch
# Result has rt_trap
ip route get 198.51.100.1 fibmatch
# Result differs from the route shown by ip route, it is missing # rt_offload_failed
ip link del dev dummy1
echo 1 > /sys/bus/netdevsim/del_device
--- net/ipv4/route.c | 2 ++ 1 file changed, 2 insertions(+)
net/ipv4/route.c +2 -0
@@ -3417,6 +3417,8 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, fa->fa_type == fri.type) { fri.offload =READ_ONCE (fa->offload); fri.trap =READ_ONCE (fa->trap); + fri.offload_failed = +READ_ONCE (fa->offload_failed);break ; } }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 124/163 net: stmmac: dwmac-stm32: fix resume on STM32 MCU
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Wolsieffer <[email protected]>
[ Upstream commit 6f195d6b0da3b689922ba9e302af2f49592fa9fc ]
The STM32MP1 keeps clk_rx enabled during suspend, and therefore the driver does not enable the clock in stm32_dwmac_init() if the device was suspended. The problem is that this same code runs on STM32 MCUs, which do disable clk_rx during suspend, causing the clock to never be re-enabled on resume.
This patch adds a variant flag to indicate that clk_rx remains enabled during suspend, and uses this to decide whether to enable the clock in stm32_dwmac_init() if the device was suspended.
This approach fixes this specific bug with limited opportunity for unintended side-effects, but I have a follow up patch that will refactor the clock configuration and hopefully make it less error prone.
--- drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c +5 -2
@@ -105,6 +105,7 @@ struct stm32_ops {int (*parse_data)(struct stm32_dwmac *dwmac,struct device *dev);u32 syscfg_eth_mask; +bool clk_rx_enable_in_suspend; };static int stm32_dwmac_init (struct plat_stmmacenet_data *plat_dat)
@@ -122,7 +123,8 @@ static int stm32_dwmac_init(struct plat_stmmacenet_data *plat_dat)if (ret)return ret; -if (!dwmac->dev->power.is_suspended) { +if (!dwmac->ops->clk_rx_enable_in_suspend || + !dwmac->dev->power.is_suspended) { ret =clk_prepare_enable (dwmac->clk_rx);if (ret) {clk_disable_unprepare (dwmac->clk_tx);
@@ -514,7 +516,8 @@ static struct stm32_ops stm32mp1_dwmac_data = { .suspend = stm32mp1_suspend, .resume = stm32mp1_resume, .parse_data = stm32mp1_parse_data, - .syscfg_eth_mask = SYSCFG_MP1_ETH_MASK + .syscfg_eth_mask = SYSCFG_MP1_ETH_MASK, + .clk_rx_enable_in_suspend = true };static const struct of_device_id stm32_dwmac_match[] = {
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 125/163 tipc: fix a potential deadlock on &tx->lock
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chengfeng Ye <[email protected]>
[ Upstream commit 08e50cf071847323414df0835109b6f3560d44f5 ]
It seems that tipc_crypto_key_revoke() could be be invoked by wokequeue tipc_crypto_work_rx() under process context and timer/rx callback under softirq context, thus the lock acquisition on &tx->lock seems better use spin_lock_bh() to prevent possible deadlock.
This flaw was found by an experimental static analysis tool I am developing for irq-related deadlock.
tipc_crypto_work_rx() <workqueue>
--> tipc_crypto_key_distr()
--> tipc_bcast_xmit()
--> tipc_bcbase_xmit()
--> tipc_bearer_bc_xmit()
--> tipc_crypto_xmit()
--> tipc_ehdr_build()
--> tipc_crypto_key_revoke()
--> spin_lock(&tx->lock)
<timer interrupt>
--> tipc_disc_timeout()
--> tipc_bearer_xmit_skb()
--> tipc_crypto_xmit()
--> tipc_ehdr_build()
--> tipc_crypto_key_revoke()
--> spin_lock(&tx->lock) <deadlock here>
--- net/tipc/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/tipc/crypto.c +2 -2
@@ -1441,14 +1441,14 @@ static int tipc_crypto_key_revoke(struct net *net, u8 tx_key)struct tipc_crypto *tx =tipc_net (net)->crypto_tx;struct tipc_key key; -spin_lock (&tx->lock); +spin_lock_bh (&tx->lock); key = tx->key;WARN_ON (!key.active || tx_key != key.active);/* Free the active key */ tipc_crypto_key_set_state (tx, key.passive,0 , key.pending);tipc_crypto_key_detach (tx->aead[key.active], &tx->lock); -spin_unlock (&tx->lock); +spin_unlock_bh (&tx->lock);pr_warn ("%s: key is revoked\n" , tx->name);return -EKEYREVOKED ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 126/163 tcp: fix quick-ack counting to count actual ACKs of new data
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neal Cardwell <[email protected]>
[ Upstream commit 059217c18be6757b95bfd77ba53fb50b48b8a816 ]
This commit fixes quick-ack counting so that it only considers that a quick-ack has been provided if we are sending an ACK that newly acknowledges data.
The code was erroneously using the number of data segments in outgoing skbs when deciding how many quick-ack credits to remove. This logic does not make sense, and could cause poor performance in request-response workloads, like RPC traffic, where requests or responses can be multi-segment skbs.
When a TCP connection decides to send N quick-acks, that is to accelerate the cwnd growth of the congestion control module controlling the remote endpoint of the TCP connection. That quick-ack decision is purely about the incoming data and outgoing ACKs. It has nothing to do with the outgoing data or the size of outgoing data.
And in particular, an ACK only serves the intended purpose of allowing the remote congestion control to grow the congestion window quickly if the ACK is ACKing or SACKing new data.
The fix is simple: only count packets as serving the goal of the quickack mechanism if they are ACKing/SACKing new data. We can tell whether this is the case by checking inet_csk_ack_scheduled(), since we schedule an ACK exactly when we are ACKing/SACKing new data.
--- include/net/tcp.h | 6 ++++-- net/ipv4/tcp_output.c | 7 +++---- 2 files changed, 7 insertions(+), 6 deletions(-)
include/net/tcp.h +4 -2
@@ -350,12 +350,14 @@ ssize_t tcp_splice_read(struct socket *sk, loff_t *ppos,struct sk_buff *tcp_stream_alloc_skb (struct sock *sk,gfp_t gfp,bool force_schedule); -static inline void tcp_dec_quickack_mode (struct sock *sk, -const unsigned int pkts) +static inline void tcp_dec_quickack_mode (struct sock *sk) {struct inet_connection_sock *icsk =inet_csk (sk);if (icsk->icsk_ack.quick) { +/* How many ACKs S/ACKing new data have we sent? */ +const unsigned int pkts =inet_csk_ack_scheduled (sk) ?1 :0 ; +if (pkts >= icsk->icsk_ack.quick) { icsk->icsk_ack.quick =0 ;/* Leaving quickack mode we deflate ATO. */
net/ipv4/tcp_output.c +3 -4
@@ -177,8 +177,7 @@ static void tcp_event_data_sent(struct tcp_sock *tp, }/* Account for an ACK we sent. */ -static inline void tcp_event_ack_sent (struct sock *sk,unsigned int pkts, -u32 rcv_nxt) +static inline void tcp_event_ack_sent (struct sock *sk,u32 rcv_nxt) {struct tcp_sock *tp =tcp_sk (sk);
@@ -192,7 +191,7 @@ static inline void tcp_event_ack_sent(struct sock *sk, unsigned int pkts,if (unlikely (rcv_nxt != tp->rcv_nxt))return ;/* Special ACK sent by DCTCP to reflect ECN */ -tcp_dec_quickack_mode (sk, pkts); +tcp_dec_quickack_mode (sk);inet_csk_clear_xmit_timer (sk,ICSK_TIME_DACK ); }
@@ -1372,7 +1371,7 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, sk, skb);if (likely (tcb->tcp_flags &TCPHDR_ACK )) -tcp_event_ack_sent (sk,tcp_skb_pcount (skb), rcv_nxt); +tcp_event_ack_sent (sk, rcv_nxt);if (skb->len != tcp_header_size) {tcp_event_data_sent (tp, sk);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 127/163 tcp: fix delayed ACKs for MSS boundary condition
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neal Cardwell <[email protected]>
[ Upstream commit 4720852ed9afb1c5ab84e96135cb5b73d5afde6f ]
This commit fixes poor delayed ACK behavior that can cause poor TCP latency in a particular boundary condition: when an application makes a TCP socket write that is an exact multiple of the MSS size.
The problem is that there is painful boundary discontinuity in the current delayed ACK behavior. With the current delayed ACK behavior, we have:
(1) If an app reads data when > 1*MSS is unacknowledged, then tcp_cleanup_rbuf() ACKs immediately because of:
tp->rcv_nxt - tp->rcv_wup > icsk->icsk_ack.rcv_mss ||
(2) If an app reads all received data, and the packets were < 1*MSS,
and either (a) the app is not ping-pong or (b) we received two
packets < 1*MSS, then tcp_cleanup_rbuf() ACKs immediately beecause
of:
((icsk->icsk_ack.pending & ICSK_ACK_PUSHED2) ||
((icsk->icsk_ack.pending & ICSK_ACK_PUSHED) &&
!inet_csk_in_pingpong_mode(sk))) &&(3) *However*: if an app reads exactly 1*MSS of data, tcp_cleanup_rbuf() does not send an immediate ACK. This is true even if the app is not ping-pong and the 1*MSS of data had the PSH bit set, suggesting the sending application completed an application write.
Thus if the app is not ping-pong, we have this painful case where
Quoted 1 line
1*MSS gets an immediate ACK, and <1*MSS gets an immediate ACK, but a
write whose last skb is an exact multiple of 1*MSS can get a 40ms delayed ACK. This means that any app that transfers data in one direction and takes care to align write size or packet size with MSS can suffer this problem. With receive zero copy making 4KB MSS values more common, it is becoming more common to have application writes naturally align with MSS, and more applications are likely to encounter this delayed ACK problem.
The fix in this commit is to refine the delayed ACK heuristics with a simple check: immediately ACK a received 1*MSS skb with PSH bit set if the app reads all data. Why? If an skb has a len of exactly 1*MSS and has the PSH bit set then it is likely the end of an application write. So more data may not be arriving soon, and yet the data sender may be waiting for an ACK if cwnd-bound or using TX zero copy. Thus we set ICSK_ACK_PUSHED in this case so that tcp_cleanup_rbuf() will send an ACK immediately if the app reads all of the data and is not ping-pong. Note that this logic is also executed for the case where len > MSS, but in that case this logic does not matter (and does not hurt) because tcp_cleanup_rbuf() will always ACK immediately if the app reads data and there is more than an MSS of unACKed data.
--- net/ipv4/tcp_input.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
net/ipv4/tcp_input.c +13 -0
@@ -243,6 +243,19 @@ static void tcp_measure_rcv_mss(struct sock *sk, const struct sk_buff *skb)if (unlikely (len > icsk->icsk_ack.rcv_mss +MAX_TCP_OPTION_SPACE ))tcp_gro_dev_warn (sk, skb, len); +/* If the skb has a len of exactly 1*MSS and has the PSH bit +* set then it is likely the end of an application write. So +* more data may not be arriving soon, and yet the data sender +* may be waiting for an ACK if cwnd-bound or using TX zero +* copy. So we set ICSK_ACK_PUSHED here so that +* tcp_cleanup_rbuf() will send an ACK immediately if the app +* reads all of the data and is not ping-pong. If len > MSS +* then this logic does not matter (and does not hurt) because +* tcp_cleanup_rbuf() will always ACK immediately if the app +* reads data and there is more than an MSS of unACKed data. +*/ +if (TCP_SKB_CB (skb)->tcp_flags &TCPHDR_PSH ) + icsk->icsk_ack.pending |=ICSK_ACK_PUSHED ; }else {/* Otherwise, we make more careful check taking into account, * that SACKs block is variable.
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 118/163 netfilter: handle the connecting collision properly in nf_conntrack_proto_sctp
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xin Long <[email protected]>
[ Upstream commit 8e56b063c86569e51eed1c5681ce6361fa97fc7a ]
In Scenario A and B below, as the delayed INIT_ACK always changes the peer vtag, SCTP ct with the incorrect vtag may cause packet loss.
Scenario A: INIT_ACK is delayed until the peer receives its own INIT_ACK
192.168.1.2 > 192.168.1.1: [INIT] [init tag: 1328086772]
192.168.1.1 > 192.168.1.2: [INIT] [init tag: 1414468151]
192.168.1.2 > 192.168.1.1: [INIT ACK] [init tag: 1328086772]
192.168.1.1 > 192.168.1.2: [INIT ACK] [init tag: 1650211246] *
192.168.1.2 > 192.168.1.1: [COOKIE ECHO]
192.168.1.1 > 192.168.1.2: [COOKIE ECHO]
192.168.1.2 > 192.168.1.1: [COOKIE ACK]Scenario B: INIT_ACK is delayed until the peer completes its own handshake
192.168.1.2 > 192.168.1.1: sctp (1) [INIT] [init tag: 3922216408]
192.168.1.1 > 192.168.1.2: sctp (1) [INIT] [init tag: 144230885]
192.168.1.2 > 192.168.1.1: sctp (1) [INIT ACK] [init tag: 3922216408]
192.168.1.1 > 192.168.1.2: sctp (1) [COOKIE ECHO]
192.168.1.2 > 192.168.1.1: sctp (1) [COOKIE ACK]192.168.1.1 > 192.168.1.2: sctp (1) [INIT ACK] [init tag: 3914796021] *
This patch fixes it as below:
In SCTP_CID_INIT processing:
- clear ct->proto.sctp.init[!dir] if ct->proto.sctp.init[dir] && ct->proto.sctp.init[!dir]. (Scenario E)
- set ct->proto.sctp.init[dir].
In SCTP_CID_INIT_ACK processing:
- drop it if !ct->proto.sctp.init[!dir] && ct->proto.sctp.vtag[!dir] && ct->proto.sctp.vtag[!dir] != ih->init_tag. (Scenario B, Scenario C)
- drop it if ct->proto.sctp.init[dir] && ct->proto.sctp.init[!dir] && ct->proto.sctp.vtag[!dir] != ih->init_tag. (Scenario A)
In SCTP_CID_COOKIE_ACK processing:
- clear ct->proto.sctp.init[dir] and ct->proto.sctp.init[!dir]. (Scenario D)
Also, it's important to allow the ct state to move forward with cookie_echo and cookie_ack from the opposite dir for the collision scenarios.
There are also other Scenarios where it should allow the packet through, addressed by the processing above:
Scenario C: new CT is created by INIT_ACK.
Scenario D: start INIT on the existing ESTABLISHED ct.
Scenario E: start INIT after the old collision on the existing ESTABLISHED ct.
192.168.1.2 > 192.168.1.1: sctp (1) [INIT] [init tag: 3922216408] 192.168.1.1 > 192.168.1.2: sctp (1) [INIT] [init tag: 144230885] (both side are stopped, then start new connection again in hours) 192.168.1.2 > 192.168.1.1: sctp (1) [INIT] [init tag: 242308742]
--- include/linux/netfilter/nf_conntrack_sctp.h | 1 + net/netfilter/nf_conntrack_proto_sctp.c | 43 ++++++++++++++++----- 2 files changed, 34 insertions(+), 10 deletions(-)
include/linux/netfilter/nf_conntrack_sctp.h +1 -0
@@ -9,6 +9,7 @@ struct ip_ct_sctp {enum sctp_conntrack state;__be32 vtag[IP_CT_DIR_MAX ]; +u8 init[IP_CT_DIR_MAX ];u8 last_dir;u8 flags; };
net/netfilter/nf_conntrack_proto_sctp.c +33 -10
75 lines not on this page · raw message
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 148/163 RDMA/bnxt_re: Fix the handling of control path response data
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Selvin Xavier <[email protected]>
commit 9fc5f9a92fe6897dbed7b9295b234cb7e3cc9d11 upstream.
Flag that indicate control path command completion should be cleared only after copying the command response data. As soon as the is_in_used flag is clear, the waiting thread can proceed with wrong response data. This wrong data is causing multiple issues like wrong lkey used in data traffic and wrong AH Id etc.
Use a memory barrier to ensure that the response data is copied and visible to the process waiting on a different cpu core before clearing the is_in_used flag.
Clear the is_in_used after copying the command response.
--- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +9 -2
@@ -664,7 +664,6 @@ static int bnxt_qplib_process_qp_event(s blocked = cookie &RCFW_CMD_IS_BLOCKING ; cookie &=RCFW_MAX_COOKIE_VALUE ; crsqe = &rcfw->crsqe_tbl[cookie]; - crsqe->is_in_used = false; if (WARN_ONCE(test_bit(FIRMWARE_STALL_DETECTED, &rcfw->cmdq.flags),
@@ -680,8 +679,14 @@ static int bnxt_qplib_process_qp_event(satomic_dec (&rcfw->timeout_send);if (crsqe->is_waiter_alive) { -if (crsqe->resp) +if (crsqe->resp) {memcpy (crsqe->resp, qp_event,sizeof (*qp_event)); +/* Insert write memory barrier to ensure that +* response data is copied before clearing the +* flags +*/ +smp_wmb (); + }if (!blocked) wait_cmds++; }
@@ -693,6 +698,8 @@ static int bnxt_qplib_process_qp_event(sif (!is_waiter_alive) crsqe->resp =NULL ; + crsqe->is_in_used = false; + hwq->cons += req_size;/* This is a case to handle below scenario -
Greg Kroah-Hartman
maintainerPATCH 157/163 ALSA: hda/realtek - Fixed two speaker platform
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kailang Yang <[email protected]>
commit fb6254df09bba303db2a1002085f6c0b90a456ed upstream.
If system has two speakers and one connect to 0x14 pin, use this function will disable it.
--- sound/pci/hda/patch_realtek.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +4 -2
@@ -7065,8 +7065,10 @@ static void alc287_fixup_bind_dacs(strucsnd_hda_override_conn_list (codec,0x17 ,ARRAY_SIZE (conn), conn); spec->gen.preferred_dacs = preferred_pairs; spec->gen.auto_mute_via_amp =1 ; -snd_hda_codec_write_cache (codec,0x14 ,0 ,AC_VERB_SET_PIN_WIDGET_CONTROL , -0x0 );/* Make sure 0x14 was disable */ +if (spec->gen.autocfg.speaker_pins[0 ] !=0x14 ) { +snd_hda_codec_write_cache (codec,0x14 ,0 ,AC_VERB_SET_PIN_WIDGET_CONTROL , +0x0 );/* Make sure 0x14 was disable */ + } }
Greg Kroah-Hartman
maintainerPATCH 158/163 x86/sev: Change npages to unsigned long in snp_accept_memory()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tom Lendacky <[email protected]>
commit 62d5e970d022ef4bde18948dd67247c3194384c1 upstream.
In snp_accept_memory(), the npages variables value is calculated from phys_addr_t variables but is an unsigned int. A very large range passed into snp_accept_memory() could lead to truncating npages to zero. This doesn't happen at the moment but let's be prepared.
--- arch/x86/kernel/sev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/kernel/sev.c +1 -2
@@ -868,8 +868,7 @@ void snp_set_memory_private(unsigned long vaddr, unsigned long npages)void snp_accept_memory (phys_addr_t start,phys_addr_t end) { -unsigned long vaddr; -unsigned int npages; +unsigned long vaddr, npages;if (!cc_platform_has (CC_ATTR_GUEST_SEV_SNP ))return ;
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 159/163 x86/sev: Use the GHCB protocol when available for SNP CPUID requests
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tom Lendacky <[email protected]>
commit 6bc6f7d9d7ac3cdbe9e8b0495538b4a0cc11f032 upstream.
SNP retrieves the majority of CPUID information from the SNP CPUID page. But there are times when that information needs to be supplemented by the hypervisor, for example, obtaining the initial APIC ID of the vCPU from leaf 1.
The current implementation uses the MSR protocol to retrieve the data from the hypervisor, even when a GHCB exists. The problem arises when an NMI arrives on return from the VMGEXIT. The NMI will be immediately serviced and may generate a #VC requiring communication with the hypervisor.
Since a GHCB exists in this case, it will be used. As part of using the GHCB, the #VC handler will write the GHCB physical address into the GHCB MSR and the #VC will be handled.
When the NMI completes, processing resumes at the site of the VMGEXIT which is expecting to read the GHCB MSR and find a CPUID MSR protocol response. Since the NMI handling overwrote the GHCB MSR response, the guest will see an invalid reply from the hypervisor and self-terminate.
Fix this problem by using the GHCB when it is available. Any NMI received is properly handled because the GHCB contents are copied into a backup page and restored on NMI exit, thus preserving the active GHCB request or result.
[ bp: Touchups. ]
--- arch/x86/kernel/sev-shared.c | 69 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 14 deletions(-)
arch/x86/kernel/sev-shared.c +55 -14
@@ -256,7 +256,7 @@ static int __sev_cpuid_hv(u32 fn, int rereturn 0 ; } -static int sev_cpuid_hv (struct cpuid_leaf *leaf) +static int __sev_cpuid_hv_msr (struct cpuid_leaf *leaf) {int ret;
@@ -279,6 +279,45 @@ static int sev_cpuid_hv(struct cpuid_leareturn ret; } +static int __sev_cpuid_hv_ghcb (struct ghcb *ghcb,struct es_em_ctxt *ctxt,struct cpuid_leaf *leaf) +{ +u32 cr4 =native_read_cr4 (); +int ret; + +ghcb_set_rax (ghcb, leaf->fn); +ghcb_set_rcx (ghcb, leaf->subfn); + +if (cr4 &X86_CR4_OSXSAVE ) +/* Safe to read xcr0 */ +ghcb_set_xcr0 (ghcb,xgetbv (XCR_XFEATURE_ENABLED_MASK )); +else +/* xgetbv will cause #UD - use reset value for xcr0 */ +ghcb_set_xcr0 (ghcb,1 ); + + ret =sev_es_ghcb_hv_call (ghcb, ctxt,SVM_EXIT_CPUID ,0 ,0 ); +if (ret !=ES_OK ) +return ret; + +if (!(ghcb_rax_is_valid (ghcb) && +ghcb_rbx_is_valid (ghcb) && +ghcb_rcx_is_valid (ghcb) && +ghcb_rdx_is_valid (ghcb))) +return ES_VMM_ERROR ; + + leaf->eax = ghcb->save.rax; + leaf->ebx = ghcb->save.rbx; + leaf->ecx = ghcb->save.rcx; + leaf->edx = ghcb->save.rdx; + +return ES_OK ; +} + +static int sev_cpuid_hv (struct ghcb *ghcb,struct es_em_ctxt *ctxt,struct cpuid_leaf *leaf) +{ +return ghcb ?__sev_cpuid_hv_ghcb (ghcb, ctxt, leaf) + :__sev_cpuid_hv_msr (leaf); +} +/* * This may be called early while still running on the initial identity * mapping. Use RIP-relative addressing to obtain the correct address
@@ -388,19 +427,20 @@ snp_cpuid_get_validated_func(struct cpuireturn false; } -static void snp_cpuid_hv (struct cpuid_leaf *leaf) +static void snp_cpuid_hv (struct ghcb *ghcb,struct es_em_ctxt *ctxt,struct cpuid_leaf *leaf) { -if (sev_cpuid_hv (leaf)) +if (sev_cpuid_hv (ghcb, ctxt, leaf))sev_es_terminate (SEV_TERM_SET_LINUX ,GHCB_TERM_CPUID_HV ); } -static int snp_cpuid_postprocess (struct cpuid_leaf *leaf) +static int snp_cpuid_postprocess (struct ghcb *ghcb,struct es_em_ctxt *ctxt, +struct cpuid_leaf *leaf) {struct cpuid_leaf leaf_hv = *leaf;switch (leaf->fn) {case 0x1 : -snp_cpuid_hv (&leaf_hv); +snp_cpuid_hv (ghcb, ctxt, &leaf_hv);/* initial APIC ID */ leaf->ebx = (leaf_hv.ebx &GENMASK (31 ,24 )) | (leaf->ebx &GENMASK (23 ,0 ));
@@ -419,7 +459,7 @@ static int snp_cpuid_postprocess(structbreak ;case 0xB : leaf_hv.subfn =0 ; -snp_cpuid_hv (&leaf_hv); +snp_cpuid_hv (ghcb, ctxt, &leaf_hv);/* extended APIC ID */ leaf->edx = leaf_hv.edx;
@@ -467,7 +507,7 @@ static int snp_cpuid_postprocess(struct }break ;case 0x8000001E : -snp_cpuid_hv (&leaf_hv); +snp_cpuid_hv (ghcb, ctxt, &leaf_hv);/* extended APIC ID */ leaf->eax = leaf_hv.eax;
@@ -488,7 +528,7 @@ static int snp_cpuid_postprocess(struct* Returns -EOPNOTSUPP if feature not enabled. Any other non-zero return value * should be treated as fatal by caller. */ -static int snp_cpuid (struct cpuid_leaf *leaf) +static int snp_cpuid (struct ghcb *ghcb,struct es_em_ctxt *ctxt,struct cpuid_leaf *leaf) {const struct snp_cpuid_table *cpuid_table =snp_cpuid_get_table ();
@@ -522,7 +562,7 @@ static int snp_cpuid(struct cpuid_leaf *return 0 ; } -return snp_cpuid_postprocess (leaf); +return snp_cpuid_postprocess (ghcb, ctxt, leaf); }/*
@@ -544,14 +584,14 @@ void __init do_vc_no_ghcb(struct pt_regs leaf.fn = fn; leaf.subfn = subfn; - ret =snp_cpuid (&leaf); + ret =snp_cpuid (NULL ,NULL , &leaf);if (!ret) goto cpuid_done;if (ret != -EOPNOTSUPP ) goto fail; -if (sev_cpuid_hv (&leaf)) +if (__sev_cpuid_hv_msr (&leaf)) goto fail; cpuid_done:
@@ -848,14 +888,15 @@ static enum es_result vc_handle_ioio(strreturn ret; } -static int vc_handle_cpuid_snp (struct pt_regs *regs) +static int vc_handle_cpuid_snp (struct ghcb *ghcb,struct es_em_ctxt *ctxt) { +struct pt_regs *regs = ctxt->regs;struct cpuid_leaf leaf;int ret; leaf.fn = regs->ax; leaf.subfn = regs->cx; - ret =snp_cpuid (&leaf); + ret =snp_cpuid (ghcb, ctxt, &leaf);if (!ret) { regs->ax = leaf.eax; regs->bx = leaf.ebx;
@@ -874,7 +915,7 @@ static enum es_result vc_handle_cpuid(stenum es_result ret;int snp_cpuid_ret; - snp_cpuid_ret =vc_handle_cpuid_snp (regs); + snp_cpuid_ret =vc_handle_cpuid_snp (ghcb, ctxt);if (!snp_cpuid_ret)return ES_OK ;if (snp_cpuid_ret != -EOPNOTSUPP )
Greg Kroah-Hartman
maintainerPATCH 160/163 ksmbd: fix race condition between session lookup and expire
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <[email protected]>
commit 53ff5cf89142b978b1a5ca8dc4d4425e6a09745f upstream.
Thread A + Thread B
ksmbd_session_lookup | smb2_sess_setup
sess = xa_load |
|
| xa_erase(&conn->sessions, sess->id);
|
| ksmbd_session_destroy(sess) --> kfree(sess)
|
// UAF! |
sess->last_active = jiffies |
+This patch add rwsem to fix race condition between ksmbd_session_lookup and ksmbd_expire_session.
--- fs/smb/server/connection.c | 2 ++ fs/smb/server/connection.h | 1 + fs/smb/server/mgmt/user_session.c | 10 +++++++--- 3 files changed, 10 insertions(+), 3 deletions(-)
fs/smb/server/connection.c +2 -0
@@ -84,6 +84,8 @@ struct ksmbd_conn *ksmbd_conn_alloc(voidspin_lock_init (&conn->llist_lock);INIT_LIST_HEAD (&conn->lock_list); +init_rwsem (&conn->session_lock); +down_write (&conn_list_lock);list_add (&conn->conns_list, &conn_list);up_write (&conn_list_lock);
fs/smb/server/connection.h +1 -0
@@ -50,6 +50,7 @@ struct ksmbd_conn {struct nls_table *local_nls;struct unicode_map *um;struct list_head conns_list; +struct rw_semaphore session_lock;/* smb session 1 per user */ struct xarray sessions;unsigned long last_active;
fs/smb/server/mgmt/user_session.c +7 -3
@@ -174,7 +174,7 @@ static void ksmbd_expire_session(structunsigned long id;struct ksmbd_session *sess; -down_write (&sessions_table_lock); +down_write (&conn->session_lock); xa_for_each(&conn->sessions, id, sess) { if (sess->state != SMB2_SESSION_VALID || time_after(jiffies,
@@ -185,7 +185,7 @@ static void ksmbd_expire_session(structcontinue ; } } -up_write (&sessions_table_lock); +up_write (&conn->session_lock); } int ksmbd_session_register(struct ksmbd_conn *conn,
@@ -227,7 +227,9 @@ void ksmbd_sessions_deregister(struct ks } } } +up_write (&sessions_table_lock); +down_write (&conn->session_lock);xa_for_each (&conn->sessions, id, sess) {unsigned long chann_id;struct channel *chann;
@@ -244,7 +246,7 @@ void ksmbd_sessions_deregister(struct ksksmbd_session_destroy (sess); } } -up_write (&sessions_table_lock); +up_write (&conn->session_lock); } struct ksmbd_session *ksmbd_session_lookup(struct ksmbd_conn *conn,
@@ -252,9 +254,11 @@ struct ksmbd_session *ksmbd_session_look {struct ksmbd_session *sess; +down_read (&conn->session_lock); sess =xa_load (&conn->sessions, id);if (sess) sess->last_active = jiffies; +up_read (&conn->session_lock);return sess; }
Greg Kroah-Hartman
maintainerPATCH 161/163 ksmbd: fix uaf in smb20_oplock_break_ack
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: luosili <[email protected]>
commit c69813471a1ec081a0b9bf0c6bd7e8afd818afce upstream.
drop reference after use opinfo.
--- fs/smb/server/smb2pdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/smb/server/smb2pdu.c +2 -2
@@ -8036,10 +8036,10 @@ static void smb20_oplock_break_ack(struc goto err_out; } -opinfo_put (opinfo); -ksmbd_fd_put (work, fp); opinfo->op_state =OPLOCK_STATE_NONE ;wake_up_interruptible_all (&opinfo->oplock_q); +opinfo_put (opinfo); +ksmbd_fd_put (work, fp); rsp->StructureSize =cpu_to_le16 (24 ); rsp->OplockLevel = rsp_oplevel;
Greg Kroah-Hartman
maintainerPATCH 162/163 ksmbd: fix race condition from parallel smb2 lock requests
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <[email protected]>
commit 75ac9a3dd65f7eab4d12b0a0f744234b5300a491 upstream.
There is a race condition issue between parallel smb2 lock request.
Time
+
Thread A | Thread A
smb2_lock | smb2_lock
|
insert smb_lock to lock_list |
spin_unlock(&work->conn->llist_lock) |
|
| spin_lock(&conn->llist_lock);
| kfree(cmp_lock);
|
// UAF! |
list_add(&smb_lock->llist, &rollback_list) +This patch swaps the line for adding the smb lock to the rollback list and adding the lock list of connection to fix the race issue.
--- fs/smb/server/smb2pdu.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
fs/smb/server/smb2pdu.c +1 -11
@@ -7029,10 +7029,6 @@ skip:ksmbd_debug (SMB ,"would have to wait for getting lock\n" ); -spin_lock (&work->conn->llist_lock); -list_add_tail (&smb_lock->clist, - &work->conn->lock_list); -spin_unlock (&work->conn->llist_lock);list_add (&smb_lock->llist, &rollback_list); argv =kmalloc (sizeof (void *),GFP_KERNEL );
@@ -7063,9 +7059,6 @@ skip:if (work->state !=KSMBD_WORK_ACTIVE ) {list_del (&smb_lock->llist); -spin_lock (&work->conn->llist_lock); -list_del (&smb_lock->clist); -spin_unlock (&work->conn->llist_lock);locks_free_lock (flock);if (work->state ==KSMBD_WORK_CANCELLED ) {
@@ -7087,19 +7080,16 @@ skip: }list_del (&smb_lock->llist); -spin_lock (&work->conn->llist_lock); -list_del (&smb_lock->clist); -spin_unlock (&work->conn->llist_lock);release_async_work (work); goto retry; }else if (!rc) { +list_add (&smb_lock->llist, &rollback_list);spin_lock (&work->conn->llist_lock);list_add_tail (&smb_lock->clist, &work->conn->lock_list);list_add_tail (&smb_lock->flist, &fp->lock_list);spin_unlock (&work->conn->llist_lock); -list_add (&smb_lock->llist, &rollback_list);ksmbd_debug (SMB ,"successful in taking lock\n" ); }else { goto out;
Greg Kroah-Hartman
maintainerPATCH 163/163 RDMA/mlx5: Remove not-used cache disable flag
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leon Romanovsky <[email protected]>
commit c99a7457e5bb873914a74307ba2df85f6799203b upstream.
During execution of mlx5_mkey_cache_cleanup(), there is a guarantee that MR are not registered and/or destroyed. It means that we don't need newly introduced cache disable flag.
--- drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 - drivers/infiniband/hw/mlx5/mr.c | 5 ----- 2 files changed, 6 deletions(-)
drivers/infiniband/hw/mlx5/mlx5_ib.h +0 -1
@@ -797,7 +797,6 @@ struct mlx5_mkey_cache {struct dentry *fs_root;unsigned long last_add;struct delayed_work remove_ent_dwork; - u8 disable: 1; };struct mlx5_ib_port_resources {
drivers/infiniband/hw/mlx5/mr.c +0 -5
@@ -1026,7 +1026,6 @@ void mlx5_mkey_cache_cleanup(struct mlx5return ;mutex_lock (&dev->cache.rb_lock); - dev->cache.disable = true;for (node =rb_first (root); node; node =rb_next (node)) { ent = rb_entry(node, struct mlx5_cache_ent, node);xa_lock_irq (&ent->mkeys);
@@ -1824,10 +1823,6 @@ static int cache_ent_find_and_store(stru }mutex_lock (&cache->rb_lock); -if (cache->disable) { -mutex_unlock (&cache->rb_lock); -return 0 ; - } ent =mkey_cache_ent_from_rb_key (dev, mr->mmkey.rb_key);if (ent) {if (ent->rb_key.ndescs == mr->mmkey.rb_key.ndescs) {
Greg Kroah-Hartman
maintainerPATCH 149/163 RDMA/uverbs: Fix typo of sizeof argument
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Meskhidze <[email protected]>
commit c489800e0d48097fc6afebd862c6afa039110a36 upstream.
Since size of 'hdr' pointer and '*hdr' structure is equal on 64-bit machines issue probably didn't cause any wrong behavior. But anyway, fixing of typo is required.
--- drivers/infiniband/core/uverbs_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/uverbs_main.c +1 -1
@@ -535,7 +535,7 @@ static ssize_t verify_hdr(struct ib_uverif (hdr->in_words *4 != count)return -EINVAL ; -if (count < method_elm->req_size +sizeof (hdr)) { +if (count < method_elm->req_size +sizeof (*hdr)) {/* * rdma-core v18 and v19 have a bug where they send DESTROY_CQ * with a 16 byte write instead of 24. Old kernels didn't
Greg Kroah-Hartman
maintainerPATCH 150/163 RDMA/srp: Do not call scsi_done() from srp_abort()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
commit e193b7955dfad68035b983a0011f4ef3590c85eb upstream.
After scmd_eh_abort_handler() has called the SCSI LLD eh_abort_handler callback, it performs one of the following actions:
* Call scsi_queue_insert().
* Call scsi_finish_command().
* Call scsi_eh_scmd_add().
Hence, SCSI abort handlers must not call scsi_done(). Otherwise all the above actions would trigger a use-after-free. Hence remove the scsi_done() call from srp_abort(). Keep the srp_free_req() call before returning SUCCESS because we may not see the command again if SUCCESS is returned.
--- drivers/infiniband/ulp/srp/ib_srp.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
drivers/infiniband/ulp/srp/ib_srp.c +5 -11
@@ -2784,7 +2784,6 @@ static int srp_abort(struct scsi_cmnd *su32 tag;u16 ch_idx;struct srp_rdma_ch *ch; -int ret;shost_printk (KERN_ERR , target->scsi_host,"SRP abort called\n" );
@@ -2798,19 +2797,14 @@ static int srp_abort(struct scsi_cmnd *sshost_printk (KERN_ERR , target->scsi_host,"Sending SRP abort for tag %#x\n" , tag);if (srp_send_tsk_mgmt (ch, tag, scmnd->device->lun, -SRP_TSK_ABORT_TASK ,NULL ) ==0 ) - ret =SUCCESS ; -else if (target->rport->state ==SRP_RPORT_LOST ) - ret =FAST_IO_FAIL ; -else - ret =FAILED ; -if (ret ==SUCCESS ) { +SRP_TSK_ABORT_TASK ,NULL ) ==0 ) {srp_free_req (ch, req, scmnd,0 ); - scmnd->result =DID_ABORT <<16 ; -scsi_done (scmnd); +return SUCCESS ; } +if (target->rport->state ==SRP_RPORT_LOST ) +return FAST_IO_FAIL ; -return ret; +return FAILED ; }static int srp_reset_device (struct scsi_cmnd *scmnd)
Greg Kroah-Hartman
maintainerPATCH 151/163 RDMA/siw: Fix connection failure handling
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernard Metzler <[email protected]>
commit 53a3f777049771496f791504e7dc8ef017cba590 upstream.
In case immediate MPA request processing fails, the newly created endpoint unlinks the listening endpoint and is ready to be dropped. This special case was not handled correctly by the code handling the later TCP socket close, causing a NULL dereference crash in siw_cm_work_handler() when dereferencing a NULL listener. We now also cancel the useless MPA timeout, if immediate MPA request processing fails.
This patch furthermore simplifies MPA processing in general:
Scheduling a useless TCP socket read in sk_data_ready() upcall is now surpressed, if the socket is already moved out of TCP_ESTABLISHED state.
--- drivers/infiniband/sw/siw/siw_cm.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/infiniband/sw/siw/siw_cm.c +12 -4
@@ -976,6 +976,7 @@ static void siw_accept_newconn(struct sisiw_cep_put (cep); new_cep->listen_cep =NULL ;if (rv) { +siw_cancel_mpatimer (new_cep);siw_cep_set_free (new_cep); goto error; }
@@ -1100,9 +1101,12 @@ static void siw_cm_work_handler(struct w/* * Socket close before MPA request received. */ -siw_dbg_cep (cep,"no mpareq: drop listener\n" ); -siw_cep_put (cep->listen_cep); - cep->listen_cep =NULL ; +if (cep->listen_cep) { +siw_dbg_cep (cep, +"no mpareq: drop listener\n" ); +siw_cep_put (cep->listen_cep); + cep->listen_cep =NULL ; + } } } release_cep =1 ;
@@ -1227,7 +1231,11 @@ static void siw_cm_llp_data_ready(structif (!cep) goto out; -siw_dbg_cep (cep,"state: %d\n" , cep->state); +siw_dbg_cep (cep,"cep state: %d, socket state %d\n" , + cep->state, sk->sk_state); + +if (sk->sk_state !=TCP_ESTABLISHED ) + goto out;switch (cep->state) {case SIW_EPSTATE_RDMA_MODE :
Greg Kroah-Hartman
maintainerPATCH 152/163 RDMA/mlx5: Fix mkey cache possible deadlock on cleanup
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shay Drory <[email protected]>
commit 374012b0045780b7ad498be62e85153009bb7fe9 upstream.
Fix the deadlock by refactoring the MR cache cleanup flow to flush the workqueue without holding the rb_lock.
This adds a race between cache cleanup and creation of new entries which we solve by denied creation of new entries after cache cleanup started.
Lockdep:
WARNING: possible circular locking dependency detected
[ 2785.326074 ] 6.2.0-rc6_for_upstream_debug_2023_01_31_14_02 #1 Not tainted
[ 2785.339778 ] ------------------------------------------------------
[ 2785.340848 ] devlink/53872 is trying to acquire lock:
[ 2785.341701 ] ffff888124f8c0c8 ((work_completion)(&(&ent->dwork)->work)){+.+.}-{0:0}, at: __flush_work+0xc8/0x900 [ 2785.343403 ]
[ 2785.343403 ] but task is already holding lock:
[ 2785.344464 ] ffff88817e8f1260 (&dev->cache.rb_lock){+.+.}-{3:3}, at: mlx5_mkey_cache_cleanup+0x77/0x250 [mlx5_ib] [ 2785.346273 ]
[ 2785.346273 ] which lock already depends on the new lock.
[ 2785.346273 ]
[ 2785.347720 ]
[ 2785.347720 ] the existing dependency chain (in reverse order) is:
[ 2785.349003 ]
[ 2785.349003 ] -> #1 (&dev->cache.rb_lock){+.+.}-{3:3}:
[ 2785.350160 ] __mutex_lock+0x14c/0x15c0
[ 2785.350962 ] delayed_cache_work_func+0x2d1/0x610 [mlx5_ib]
[ 2785.352044 ] process_one_work+0x7c2/0x1310
[ 2785.352879 ] worker_thread+0x59d/0xec0
[ 2785.353636 ] kthread+0x28f/0x330
[ 2785.354370 ] ret_from_fork+0x1f/0x30
[ 2785.355135 ]
[ 2785.355135 ] -> #0 ((work_completion)(&(&ent->dwork)->work)){+.+.}-{0:0}:
[ 2785.356515 ] __lock_acquire+0x2d8a/0x5fe0
[ 2785.357349 ] lock_acquire+0x1c1/0x540
[ 2785.358121 ] __flush_work+0xe8/0x900
[ 2785.358852 ] __cancel_work_timer+0x2c7/0x3f0
[ 2785.359711 ] mlx5_mkey_cache_cleanup+0xfb/0x250 [mlx5_ib]
[ 2785.360781 ] mlx5_ib_stage_pre_ib_reg_umr_cleanup+0x16/0x30 [mlx5_ib]
[ 2785.361969 ] __mlx5_ib_remove+0x68/0x120 [mlx5_ib]
[ 2785.362960 ] mlx5r_remove+0x63/0x80 [mlx5_ib]
[ 2785.363870 ] auxiliary_bus_remove+0x52/0x70
[ 2785.364715 ] device_release_driver_internal+0x3c1/0x600
[ 2785.365695 ] bus_remove_device+0x2a5/0x560
[ 2785.366525 ] device_del+0x492/0xb80
[ 2785.367276 ] mlx5_detach_device+0x1a9/0x360 [mlx5_core]
[ 2785.368615 ] mlx5_unload_one_devl_locked+0x5a/0x110 [mlx5_core]
[ 2785.369934 ] mlx5_devlink_reload_down+0x292/0x580 [mlx5_core]
[ 2785.371292 ] devlink_reload+0x439/0x590
[ 2785.372075 ] devlink_nl_cmd_reload+0xaef/0xff0
[ 2785.372973 ] genl_family_rcv_msg_doit.isra.0+0x1bd/0x290
[ 2785.374011 ] genl_rcv_msg+0x3ca/0x6c0
[ 2785.374798 ] netlink_rcv_skb+0x12c/0x360
[ 2785.375612 ] genl_rcv+0x24/0x40
[ 2785.376295 ] netlink_unicast+0x438/0x710
[ 2785.377121 ] netlink_sendmsg+0x7a1/0xca0
[ 2785.377926 ] sock_sendmsg+0xc5/0x190
[ 2785.378668 ] __sys_sendto+0x1bc/0x290
[ 2785.379440 ] __x64_sys_sendto+0xdc/0x1b0
[ 2785.380255 ] do_syscall_64+0x3d/0x90
[ 2785.381031 ] entry_SYSCALL_64_after_hwframe+0x46/0xb0
[ 2785.381967 ]
[ 2785.381967 ] other info that might help us debug this:
[ 2785.381967 ]
[ 2785.383448 ] Possible unsafe locking scenario:
[ 2785.383448 ]
[ 2785.384544 ] CPU0 CPU1
[ 2785.385383 ] ---- ----
[ 2785.386193 ] lock(&dev->cache.rb_lock);
[ 2785.386940 ] lock((work_completion)(&(&ent->dwork)->work));
[ 2785.388327 ] lock(&dev->cache.rb_lock);
[ 2785.389425 ] lock((work_completion)(&(&ent->dwork)->work));
[ 2785.390414 ]
[ 2785.390414 ] *** DEADLOCK ***
[ 2785.390414 ]
[ 2785.391579 ] 6 locks held by devlink/53872:
[ 2785.392341 ] #0: ffffffff84c17a50 (cb_lock){++++}-{3:3}, at: genl_rcv+0x15/0x40
[ 2785.393630 ] #1: ffff888142280218 (&devlink->lock_key){+.+.}-{3:3}, at: devlink_get_from_attrs_lock+0x12d/0x2d0
[ 2785.395324 ] #2: ffff8881422d3c38 (&dev->lock_key){+.+.}-{3:3}, at: mlx5_unload_one_devl_locked+0x4a/0x110 [mlx5_core]
[ 2785.397322 ] #3: ffffffffa0e59068 (mlx5_intf_mutex){+.+.}-{3:3}, at: mlx5_detach_device+0x60/0x360 [mlx5_core]
[ 2785.399231 ] #4: ffff88810e3cb0e8 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0x8d/0x600
[ 2785.400864 ] #5: ffff88817e8f1260 (&dev->cache.rb_lock){+.+.}-{3:3}, at: mlx5_mkey_cache_cleanup+0x77/0x250 [mlx5_ib]--- drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/mr.c | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-)
drivers/infiniband/hw/mlx5/mlx5_ib.h +1 -0
@@ -797,6 +797,7 @@ struct mlx5_mkey_cache {struct dentry *fs_root;unsigned long last_add;struct delayed_work remove_ent_dwork; + u8 disable: 1; };struct mlx5_ib_port_resources {
drivers/infiniband/hw/mlx5/mr.c +14 -2
@@ -1024,19 +1024,27 @@ void mlx5_mkey_cache_cleanup(struct mlx5if (!dev->cache.wq)return ; -cancel_delayed_work_sync (&dev->cache.remove_ent_dwork);mutex_lock (&dev->cache.rb_lock); + dev->cache.disable = true;for (node =rb_first (root); node; node =rb_next (node)) { ent = rb_entry(node, struct mlx5_cache_ent, node);xa_lock_irq (&ent->mkeys); ent->disabled = true;xa_unlock_irq (&ent->mkeys); -cancel_delayed_work_sync (&ent->dwork); } +mutex_unlock (&dev->cache.rb_lock); + +/* +* After all entries are disabled and will not reschedule on WQ, +* flush it and all async commands. +*/ +flush_workqueue (dev->cache.wq);mlx5_mkey_cache_debugfs_cleanup (dev);mlx5_cmd_cleanup_async_ctx (&dev->async_ctx); +/* At this point all entries are disabled and have no concurrent work. */ +mutex_lock (&dev->cache.rb_lock); node =rb_first (root);while (node) { ent = rb_entry(node, struct mlx5_cache_ent, node);
@@ -1815,6 +1823,10 @@ static int cache_ent_find_and_store(stru }mutex_lock (&cache->rb_lock); +if (cache->disable) { +mutex_unlock (&cache->rb_lock); +return 0 ; + } ent =mkey_cache_ent_from_rb_key (dev, mr->mmkey.rb_key);if (ent) {if (ent->rb_key.ndescs == mr->mmkey.rb_key.ndescs) {
Greg Kroah-Hartman
maintainerPATCH 153/163 RDMA/mlx5: Fix assigning access flags to cache mkeys
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Guralnik <[email protected]>
commit 4f14c6c0213e1def48f0f887d35f44095416c67d upstream.
After the change to use dynamic cache structure, new cache entries can be added and the mkey allocation can no longer assume that all mkeys created for the cache have access_flags equal to zero.
Example of a flow that exposes the issue:
A user registers MR with RO on a HCA that cannot UMR RO and the mkey is created outside of the cache. When the user deregisters the MR, a new cache entry is created to store mkeys with RO.
Later, the user registers 2 MRs with RO. The first MR is reused from the new cache entry. When we try to get the second mkey from the cache we see the entry is empty so we go to the MR cache mkey allocation flow which would have allocated a mkey with no access flags, resulting the user getting a MR without RO.
--- drivers/infiniband/hw/mlx5/mr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/mr.c +2 -1
@@ -301,7 +301,8 @@ static int get_mkc_octo_size(unsigned instatic void set_cache_mkc (struct mlx5_cache_ent *ent,void *mkc) { -set_mkc_access_pd_addr_fields (mkc,0 ,0 , ent->dev->umrc.pd); +set_mkc_access_pd_addr_fields (mkc, ent->rb_key.access_flags,0 , + ent->dev->umrc.pd);MLX5_SET (mkc, mkc, free,1 );MLX5_SET (mkc, mkc, umr_en,1 );MLX5_SET (mkc, mkc, access_mode_1_0, ent->rb_key.access_mode &0x3 );
Greg Kroah-Hartman
maintainerPATCH 154/163 RDMA/mlx5: Fix mutex unlocking on error flow for steering anchor creation
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hamdan Igbaria <[email protected]>
commit 2fad8f06a582cd431d398a0b3f9be21d069603ab upstream.
The mutex was not unlocked on some of the error flows. Moved the unlock location to include all the error flow scenarios.
--- drivers/infiniband/hw/mlx5/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/fs.c +1 -1
@@ -2470,8 +2470,8 @@ destroy_res:mlx5_steering_anchor_destroy_res (ft_prio); put_flow_table:put_flow_table (dev, ft_prio, true); -mutex_unlock (&dev->flow_db->lock); free_obj: +mutex_unlock (&dev->flow_db->lock);kfree (obj);return err;
Greg Kroah-Hartman
maintainerPATCH 155/163 RDMA/mlx5: Fix NULL string error
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shay Drory <[email protected]>
commit dab994bcc609a172bfdab15a0d4cb7e50e8b5458 upstream.
checkpath is complaining about NULL string, change it to 'Unknown'.
--- drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/main.c +1 -1
@@ -2070,7 +2070,7 @@ static inline char *mmap_cmd2str(enum mlcase MLX5_IB_MMAP_DEVICE_MEM :return "Device Memory" ;default : -return NULL ; +return "Unknown" ; } }
Greg Kroah-Hartman
maintainerPATCH 156/163 ALSA: hda/realtek: Fix spelling mistake "powe" -> "power"
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Colin Ian King <[email protected]>
commit f286620b5dc974fe281d8feed6e228fd2f39d013 upstream.
There is a spelling mistake in a quirk entry. Fix it.
--- sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/patch_realtek.c +1 -1
@@ -10016,7 +10016,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x17aa ,0x3869 ,"Lenovo Yoga7 14IAL7" ,ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN ),SND_PCI_QUIRK (0x17aa ,0x387d ,"Yoga S780-16 pro Quad AAC" ,ALC287_FIXUP_TAS2781_I2C ),SND_PCI_QUIRK (0x17aa ,0x387e ,"Yoga S780-16 pro Quad YC" ,ALC287_FIXUP_TAS2781_I2C ), -SND_PCI_QUIRK (0x17aa ,0x3881 ,"YB9 dual powe mode2 YC" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x3881 ,"YB9 dual power mode2 YC" ,ALC287_FIXUP_TAS2781_I2C ),SND_PCI_QUIRK (0x17aa ,0x3884 ,"Y780 YG DUAL" ,ALC287_FIXUP_TAS2781_I2C ),SND_PCI_QUIRK (0x17aa ,0x3886 ,"Y780 VECO DUAL" ,ALC287_FIXUP_TAS2781_I2C ), SND_PCI_QUIRK(0x17aa, 0x38a7, "Y780P AMD YG dual", ALC287_FIXUP_TAS2781_I2C),
Greg Kroah-Hartman
maintainerPATCH 147/163 RDMA/cma: Fix truncation compilation warning in make_cma_ports
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leon Romanovsky <[email protected]>
commit 18126c767658ae8a831257c6cb7776c5ba5e7249 upstream.
The following compilation error is false alarm as RDMA devices don't have such large amount of ports to actually cause to format truncation.
drivers/infiniband/core/cma_configfs.c: In function ‘make_cma_ports’:drivers/infiniband/core/cma_configfs.c:223:57: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
223 | snprintf(port_str, sizeof(port_str), "%u", i + 1);
| ^drivers/infiniband/core/cma_configfs.c:223:17: note: ‘snprintf’ output between 2 and 11 bytes into a destination of size 10
223 | snprintf(port_str, sizeof(port_str), "%u", i + 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:243: drivers/infiniband/core/cma_configfs.o] Error 1
--- drivers/infiniband/core/cma_configfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/cma_configfs.c +1 -1
@@ -217,7 +217,7 @@ static int make_cma_ports(struct cma_devreturn -ENOMEM ;for (i =0 ; i < ports_num; i++) { -char port_str[10 ]; +char port_str[11 ]; ports[i].port_num = i +1 ;snprintf (port_str,sizeof (port_str),"%u" , i +1 );
Re: [PATCH 6.5 001/163] ALSA: hda/tas2781: Add tas2781 HDA driver
In reply to Greg Kroah-HartmanQuoted 15 lines · Greg Kroah-Hartman
6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shenghao Ding <[email protected]>
[ Upstream commit
3babae915f4c15d76a5134e55806a1c1588e2865]Integrate tas2781 configs for Lenovo Laptops. All of the tas2781s in the laptop will be aggregated as one audio device. The code support realtek as the primary codec. Rename "struct
cs35l41_dev_name" to "structscodec_dev_name" for all other side codecs instead of the certain one.
Quoted 5 lines
Signed-off-by Shenghao Ding <[email protected]>Signed-off-by Takashi Iwai <[email protected]>Stable-dep-of:
41b07476da38("ALSA: hda/realtek - ALC287 Realtek I2S speaker platform support")Signed-off-by Sasha Levin <[email protected]>
This makes little sense without the backport of commit 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver"). Confusingly, the patch subject is very same as this commit...
And the above commit has more follow-up fixes, too. 1c80cc055b3f17a1eab7b70ded81cb9e0517
thanks,
Takashi
Quoted 162 lines
--- sound/pci/hda/patch_realtek.c | 88 +++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 3 deletions(-)sound/pci/hda/patch_realtek.c +85
-3@@ -6721,7 +6721,7 @@ static void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_ } } -struct cs35l41_dev_name { +struct scodec_dev_name {const char *bus;const char *hid;int index;@@ -6730,7 +6730,7 @@ struct cs35l41_dev_name {/* match the device name in a slightly relaxed manner */ static int comp_match_cs35l41_dev_name (struct device *dev,void *data) { -struct cs35l41_dev_name *p = data; +struct scodec_dev_name *p = data;const char *d =dev_name (dev);int n =strlen (p->bus);char tmp[32 ];@@ -6746,12 +6746,32 @@ static int comp_match_cs35l41_dev_name(struct device *dev, void *data)return !strcmp (d + n, tmp); } +static int comp_match_tas2781_dev_name (struct device *dev, +void *data) +{ +struct scodec_dev_name *p = data; +const char *d =dev_name (dev); +int n =strlen (p->bus); +char tmp[32 ]; + +/* check the bus name */ +if (strncmp (d, p->bus, n)) +return 0 ; +/* skip the bus number */ +if (isdigit (d[n])) + n++; +/* the rest must be exact matching */ +snprintf (tmp,sizeof (tmp),"-%s:00" , p->hid); + +return !strcmp (d + n, tmp); +} +static void cs35l41_generic_fixup (struct hda_codec *cdc,int action,const char *bus,const char *hid,int count) {struct device *dev =hda_codec_dev (cdc);struct alc_spec *spec = cdc->spec; -struct cs35l41_dev_name *rec; +struct scodec_dev_name *rec;int ret, i;switch (action) {@@ -6779,6 +6799,41 @@ static void cs35l41_generic_fixup(struct hda_codec *cdc, int action, const char } } +static void tas2781_generic_fixup (struct hda_codec *cdc,int action, +const char *bus,const char *hid) +{ +struct device *dev =hda_codec_dev (cdc); +struct alc_spec *spec = cdc->spec; +struct scodec_dev_name *rec; +int ret; + +switch (action) { +case HDA_FIXUP_ACT_PRE_PROBE : + rec =devm_kmalloc (dev,sizeof (*rec),GFP_KERNEL ); +if (!rec) +return ; + rec->bus = bus; + rec->hid = hid; + rec->index =0 ; + spec->comps[0 ].codec = cdc; +component_match_add (dev, &spec->match, + comp_match_tas2781_dev_name, rec); + ret =component_master_add_with_match (dev, &comp_master_ops, + spec->match); +if (ret) +codec_err (cdc, +"Fail to register component aggregator %d\n" , + ret); +else + spec->gen.pcm_playback_hook = + comp_generic_playback_hook; +break ; +case HDA_FIXUP_ACT_FREE : +component_master_del (dev, &comp_master_ops); +break ; + } +} +static void cs35l41_fixup_i2c_two (struct hda_codec *cdc,const struct hda_fixup *fix,int action) {cs35l41_generic_fixup (cdc, action,"i2c" ,"CSC3551" ,2 );@@ -6806,6 +6861,12 @@ static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const stcs35l41_generic_fixup (cdc, action,"i2c" ,"CLSA0101" ,2 ); } +static void tas2781_fixup_i2c (struct hda_codec *cdc, +const struct hda_fixup *fix,int action) +{ +tas2781_generic_fixup (cdc, action,"i2c" ,"TIAS2781" ); +} +/* for alc295_fixup_hp_top_speakers */ #include "hp_x360_helper.c" @@ -7231,6 +7292,7 @@ enum {ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS ,ALC236_FIXUP_DELL_DUAL_CODECS ,ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI , + ALC287_FIXUP_TAS2781_I2C, };/* A special fixup for Lenovo C940 and Yoga Duet 7; @@ -9309,6 +9371,12 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC269_FIXUP_THINKPAD_ACPI, }, + [ALC287_FIXUP_TAS2781_I2C] = { + .type = HDA_FIXUP_FUNC, + .v.func = tas2781_fixup_i2c, + .chained = true, + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = {@@ -9890,6 +9958,20 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x3853 ,"Lenovo Yoga 7 15ITL5" ,ALC287_FIXUP_YOGA7_14ITL_SPEAKERS ),SND_PCI_QUIRK (0x17aa ,0x3855 ,"Legion 7 16ITHG6" ,ALC287_FIXUP_LEGION_16ITHG6 ),SND_PCI_QUIRK (0x17aa ,0x3869 ,"Lenovo Yoga7 14IAL7" ,ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN ), +SND_PCI_QUIRK (0x17aa ,0x387d ,"Yoga S780-16 pro Quad AAC" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x387e ,"Yoga S780-16 pro Quad YC" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x3881 ,"YB9 dual powe mode2 YC" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x3884 ,"Y780 YG DUAL" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x3886 ,"Y780 VECO DUAL" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x38a7 ,"Y780P AMD YG dual" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x38a8 ,"Y780P AMD VECO dual" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x38ba ,"Yoga S780-14.5 Air AMD quad YC" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x38bb ,"Yoga S780-14.5 Air AMD quad AAC" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x38be ,"Yoga S980-14.5 proX YC Dual" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x38bf ,"Yoga S980-14.5 proX LX Dual" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x38c3 ,"Y980 DUAL" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x38cb ,"Y790 YG DUAL" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x38cd ,"Y790 VECO DUAL" ,ALC287_FIXUP_TAS2781_I2C ),SND_PCI_QUIRK (0x17aa ,0x3902 ,"Lenovo E50-80" ,ALC269_FIXUP_DMIC_THINKPAD_ACPI ),SND_PCI_QUIRK (0x17aa ,0x3977 ,"IdeaPad S210" ,ALC283_FIXUP_INT_MIC ), SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),Signature · 1 line
2.40.1
Sasha Levin
maintainerRe: [PATCH 6.5 001/163] ALSA: hda/tas2781: Add tas2781 HDA driver
Quoted 23 lines · Takashi Iwai
Quoted 15 lines · Greg Kroah-Hartman
6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shenghao Ding <[email protected]>
[ Upstream commit
3babae915f4c15d76a5134e55806a1c1588e2865]Integrate tas2781 configs for Lenovo Laptops. All of the tas2781s in the laptop will be aggregated as one audio device. The code support realtek as the primary codec. Rename "struct
cs35l41_dev_name" to "structscodec_dev_name" for all other side codecs instead of the certain one.Quoted 5 lines
Signed-off-by Shenghao Ding <[email protected]>Signed-off-by Takashi Iwai <[email protected]>Stable-dep-of:
41b07476da38("ALSA: hda/realtek - ALC287 Realtek I2S speaker platform support")Signed-off-by Sasha Levin <[email protected]>
Quoted 3 lines
This makes little sense without the backport of commit
5be27f1e3ec9("ALSA: hda/tas2781: Add tas2781 HDA driver"). Confusingly, the patch subject is very same as this commit...
This is a tricky one: 3babae915f4 really doesn't add a new driver but rather just refactors some of the quirk handling which is needed for later patches to apply. It's the following 5be27f1e3ec9 which actually adds the driver (which we don't need here).
We don't actually want to bring in a new driver, so 5be27f1e3ec9 is unnecessary.
Quoted 4 lines
And the above commit has more follow-up fixes, too.
1c80cc055b3f17a1eab7b70ded81cb9e0517
If we don't take 5be27f1e3ec9 then we don't need any of the follow-up fixes.
Signature · 2 lines
Thanks, Sasha
Re: [PATCH 6.5 001/163] ALSA: hda/tas2781: Add tas2781 HDA driver
Quoted 29 lines · Sasha Levin
Quoted 23 lines · Takashi Iwai
Quoted 15 lines · Greg Kroah-Hartman
6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shenghao Ding <[email protected]>
[ Upstream commit
3babae915f4c15d76a5134e55806a1c1588e2865]Integrate tas2781 configs for Lenovo Laptops. All of the tas2781s in the laptop will be aggregated as one audio device. The code support realtek as the primary codec. Rename "struct
cs35l41_dev_name" to "structscodec_dev_name" for all other side codecs instead of the certain one.Quoted 5 lines
Signed-off-by Shenghao Ding <[email protected]>Signed-off-by Takashi Iwai <[email protected]>Stable-dep-of:
41b07476da38("ALSA: hda/realtek - ALC287 Realtek I2S speaker platform support")Signed-off-by Sasha Levin <[email protected]>Quoted 3 lines
This makes little sense without the backport of commit
5be27f1e3ec9("ALSA: hda/tas2781: Add tas2781 HDA driver"). Confusingly, the patch subject is very same as this commit...
Quoted 7 lines
This is a tricky one:
3babae915f4really doesn't add a new driver but rather just refactors some of the quirk handling which is needed for later patches to apply. It's the following5be27f1e3ec9which actually adds the driver (which we don't need here).We don't actually want to bring in a new driver, so
5be27f1e3ec9is unnecessary.
If we don't want the backport of 5be27f1e3ec9, this commit (3babae915f4c) and other relevant ones must be dropped, too.
Takashi
Sasha Levin
maintainerRe: [PATCH 6.5 001/163] ALSA: hda/tas2781: Add tas2781 HDA driver
Quoted 36 lines · Takashi Iwai
Quoted 34 lines · Sasha Levin
Quoted 23 lines · Takashi Iwai
Quoted 15 lines · Greg Kroah-Hartman
6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shenghao Ding <[email protected]>
[ Upstream commit
3babae915f4c15d76a5134e55806a1c1588e2865]Integrate tas2781 configs for Lenovo Laptops. All of the tas2781s in the laptop will be aggregated as one audio device. The code support realtek as the primary codec. Rename "struct
cs35l41_dev_name" to "structscodec_dev_name" for all other side codecs instead of the certain one.Quoted 5 lines
Signed-off-by Shenghao Ding <[email protected]>Signed-off-by Takashi Iwai <[email protected]>Stable-dep-of:
41b07476da38("ALSA: hda/realtek - ALC287 Realtek I2S speaker platform support")Signed-off-by Sasha Levin <[email protected]>Quoted 3 lines
This makes little sense without the backport of commit
5be27f1e3ec9("ALSA: hda/tas2781: Add tas2781 HDA driver"). Confusingly, the patch subject is very same as this commit...This is a tricky one:
3babae915f4really doesn't add a new driver but rather just refactors some of the quirk handling which is needed for later patches to apply. It's the following5be27f1e3ec9which actually adds the driver (which we don't need here).
Quoted 5 lines
Quoted 2 lines
We don't actually want to bring in a new driver, so
5be27f1e3ec9is unnecessary.If we don't want the backport of
5be27f1e3ec9, this commit (3babae915f4c) and other relevant ones must be dropped, too.
Sure, I've dropped:
3babae915f4c ("ALSA: hda/tas2781: Add tas2781 HDA driver")93dc18e11b1a ("ALSA: hda/realtek: Add quirk for HP Victus 16-d1xxx to enable mute LED") c99c26b16c15 ("ALSA: hda/realtek: Add quirk for mute LEDs on HP ENVY x360 15-eu0xxx") e43252db7e20 ("ALSA: hda/realtek - ALC287 I2S speaker platform support") 41b07476da38 ("ALSA: hda/realtek - ALC287 Realtek I2S speaker platform support")
Signature · 2 lines
Thanks, Sasha
Greg Kroah-Hartman
maintainerRe: [PATCH 6.5 001/163] ALSA: hda/tas2781: Add tas2781 HDA driver
In reply to Takashi IwaiQuoted 36 lines · Takashi Iwai
Quoted 34 lines · Sasha Levin
Quoted 23 lines · Takashi Iwai
Quoted 15 lines · Greg Kroah-Hartman
6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shenghao Ding <[email protected]>
[ Upstream commit
3babae915f4c15d76a5134e55806a1c1588e2865]Integrate tas2781 configs for Lenovo Laptops. All of the tas2781s in the laptop will be aggregated as one audio device. The code support realtek as the primary codec. Rename "struct
cs35l41_dev_name" to "structscodec_dev_name" for all other side codecs instead of the certain one.Quoted 5 lines
Signed-off-by Shenghao Ding <[email protected]>Signed-off-by Takashi Iwai <[email protected]>Stable-dep-of:
41b07476da38("ALSA: hda/realtek - ALC287 Realtek I2S speaker platform support")Signed-off-by Sasha Levin <[email protected]>Quoted 3 lines
This makes little sense without the backport of commit
5be27f1e3ec9("ALSA: hda/tas2781: Add tas2781 HDA driver"). Confusingly, the patch subject is very same as this commit...This is a tricky one:
3babae915f4really doesn't add a new driver but rather just refactors some of the quirk handling which is needed for later patches to apply. It's the following5be27f1e3ec9which actually adds the driver (which we don't need here).
Quoted 5 lines
Quoted 2 lines
We don't actually want to bring in a new driver, so
5be27f1e3ec9is unnecessary.If we don't want the backport of
5be27f1e3ec9, this commit (3babae915f4c) and other relevant ones must be dropped, too.
All are now dropped, thanks.
greg k-h
Hello,
Quoted 5 lines · On Mon, 9 Oct 2023 14:59:24 +0200 Greg Kroah-Hartman…
This is the start of the stable review cycle for the 6.5.7 release. There are 163 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Responses should be made by Wed, 11 Oct 2023 13:00:55 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.5.7-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.5.y
and the diffstat can be found below.
This rc kernel passes DAMON functionality test[1] on my test machine. Attaching the test results summary below. Please note that I retrieved the kernel from linux-stable-rc tree[2].
[1] https://github.com/awslabs/damon-tests/tree/next/corr
[2] e640325b3c9a ("Linux 6.5.7-rc1")
Thanks,
SJ
[...]
---
ok 1 selftests: damon: debugfs_attrs.sh
ok 2 selftests: damon: debugfs_schemes.sh
ok 3 selftests: damon: debugfs_target_ids.sh
ok 4 selftests: damon: debugfs_empty_targets.sh
ok 5 selftests: damon: debugfs_huge_count_read_write.sh
ok 6 selftests: damon: debugfs_duplicate_context_creation.sh
ok 7 selftests: damon: debugfs_rm_non_contexts.sh
ok 8 selftests: damon: sysfs.sh
ok 9 selftests: damon: sysfs_update_removed_scheme_dir.sh
ok 10 selftests: damon: reclaim.sh
ok 11 selftests: damon: lru_sort.sh
ok 1 selftests: damon-tests: kunit.sh
ok 2 selftests: damon-tests: huge_count_read_write.sh
ok 3 selftests: damon-tests: buffer_overflow.sh
ok 4 selftests: damon-tests: rm_contexts.sh
ok 5 selftests: damon-tests: record_null_deref.sh
ok 6 selftests: damon-tests: dbgfs_target_ids_read_before_terminate_race.sh ok 7 selftests: damon-tests: dbgfs_target_ids_pid_leak.sh
ok 8 selftests: damon-tests: damo_tests.sh
ok 9 selftests: damon-tests: masim-record.sh
ok 10 selftests: damon-tests: build_i386.sh
ok 11 selftests: damon-tests: build_arm64.sh
ok 12 selftests: damon-tests: build_i386_idle_flag.sh
ok 13 selftests: damon-tests: build_i386_highpte.sh
ok 14 selftests: damon-tests: build_nomemcg.sh
[33m
[92mPASS [39m_remote_run_corr.sh SUCCESS
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.5.7 release. There are 163 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 11 Oct 2023 13:00:55 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.5.7-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.5.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.5.7 release. There are 163 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 11 Oct 2023 13:00:55 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.5.7-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.5.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.5.7 release. There are 163 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Successfully compiled and installed bindeb-pkgs on my computer (Acer Aspire E15, Intel Core i3 Haswell). No noticeable regressions.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.5.7 release. There are 163 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 11 Oct 2023 13:00:55 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.5.7-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.5.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.5.7 release. There are 163 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 11 Oct 2023 13:00:55 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.5.7-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.5.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.5:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
116 tests: 116 pass, 0 failLinux version: 6.5.7-rc1-g36615f3f3371
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.5.7 release. There are 163 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 11 Oct 2023 13:00:55 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.5.7-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.5.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
NOTE:
Build warning on armv7,net/mac80211/mlme.c: In function 'ieee80211_rx_mgmt_assoc_resp':net/mac80211/mlme.c:5474:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=]
## Build
* kernel: 6.5.7-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.5.y
* git commit: e640325b3c9a18f1de24daa332563620eb03309e
* git describe: v6.5.6-164-ge640325b3c9a
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.5.y/build/v6.5.6-164-ge640325b3c9a
## Test Regressions (compared to v6.5.6)
## Metric Regressions (compared to v6.5.6)
## Test Fixes (compared to v6.5.6)
## Metric Fixes (compared to v6.5.6)
## Test result summary
total: 132702, pass: 113630, fail: 2151, skip: 16744, xfail: 177
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 141 total, 141 passed, 0 failed
* arm64: 52 total, 51 passed, 1 failed
* i386: 41 total, 41 passed, 0 failed
* mips: 30 total, 28 passed, 2 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 37 total, 35 passed, 2 failed
* riscv: 26 total, 25 passed, 1 failed
* s390: 16 total, 13 passed, 3 failed
* sh: 14 total, 12 passed, 2 failed
* sparc: 8 total, 8 passed, 0 failed
* x86_64: 46 total, 46 passed, 0 failed
## Test suites summary
* boot
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-filesystems-epoll
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-user_events
* kselftest-vDSO
* kselftest-vm
* kselftest-watchdog
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture
* v4l2-compliance
--
Linaro LKFT
https://lkft.linaro.org
Quoted 9 lines
This is the start of the stable review cycle for the 6.5.7 release. There are 163 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 11 Oct 2023 13:00:55 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.5.7-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.5.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my x86_64 and ARM64 test systems. No errors or regressions.
Thanks.
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.5.7 release. There are 163 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 11 Oct 2023 13:00:55 +0000. Anything received after that time might be too late.
Build results:
total: 157 pass: 157 fail: 0 Qemu test results: total: 530 pass: 530 fail: 0
Guenter