On Thu, 26 Nov 2026 01:54:59 +0100, Antonio Quartulli <[email protected]> wrote: > From: Antonio Quartulli <[email protected]> > > ovpn_encrypt_post() may take the TCP transport socket lock with a plain > spin_lock(), which requires BHs disabled as the lock is also taken in > softirq context. Some async crypto drivers complete requests from a > workqueue or kthread with BHs enabled (e.g. qce, starfive, keembay), and > a completion can then deadlock against TCP softirq processing on the > same CPU. > > Crypto drivers are expected to complete with BHs disabled (see > crypto_engine's lockdep_assert_in_softirq()), but not all do: wrap the > async encrypt completion in local_bh_disable()/enable(). > > Fixes: 11851cbd60ea ("ovpn: implement TCP transport") > Cc: [email protected] > Signed-off-by: Antonio Quartulli <[email protected]>
Reviewed-by: Ralf Lici <[email protected]> One optional nit: adding a lockdep_assert_in_softirq in ovpn_tcp_send_skb would record the "BH must be off here" requirement right at the lock but I wouldn't respin just for that. -- Ralf Lici Mandelbit Srl _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
