This is a note to let you know that I've just added the patch titled tls: rx: strp: don't use GFP_KERNEL in softirq context to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tls-rx-strp-don-t-use-gfp_kernel-in-softirq-context.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 74836ec828fe17b63f2006fdbf53311d691396bf Mon Sep 17 00:00:00 2001 From: Jakub Kicinski <kuba@xxxxxxxxxx> Date: Tue, 16 May 2023 18:50:42 -0700 Subject: tls: rx: strp: don't use GFP_KERNEL in softirq context From: Jakub Kicinski <kuba@xxxxxxxxxx> commit 74836ec828fe17b63f2006fdbf53311d691396bf upstream. When receive buffer is small, or the TCP rx queue looks too complicated to bother using it directly - we allocate a new skb and copy data into it. We already use sk->sk_allocation... but nothing actually sets it to GFP_ATOMIC on the ->sk_data_ready() path. Users of HW offload are far more likely to experience problems due to scheduling while atomic. "Copy mode" is very rarely triggered with SW crypto. Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser") Tested-by: Shai Amiram <samiram@xxxxxxxxxx> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/tls/tls_sw.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -2289,8 +2289,12 @@ static void tls_data_ready(struct sock * struct tls_context *tls_ctx = tls_get_ctx(sk); struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); struct sk_psock *psock; + gfp_t alloc_save; + alloc_save = sk->sk_allocation; + sk->sk_allocation = GFP_ATOMIC; tls_strp_data_ready(&ctx->strp); + sk->sk_allocation = alloc_save; psock = sk_psock_get(sk); if (psock) { Patches currently in stable-queue which might be from kuba@xxxxxxxxxx are queue-6.1/tcp-return-user_mss-for-tcp_maxseg-in-close-listen-s.patch queue-6.1/net-devlink-take-rtnl-in-port_fill-function-only-if-.patch queue-6.1/net-devlink-convert-devlink-port-type-specific-point.patch queue-6.1/net-expose-devlink-port-over-rtnetlink.patch queue-6.1/tls-rx-strp-don-t-use-gfp_kernel-in-softirq-context.patch queue-6.1/net-sched-sch_ingress-only-create-under-tc_h_ingress.patch queue-6.1/af_packet-do-not-use-read_once-in-packet_bind.patch queue-6.1/af_packet-fix-data-races-of-pkt_sk-sk-num.patch queue-6.1/mptcp-add-annotations-around-msk-subflow-accesses.patch queue-6.1/net-usb-qmi_wwan-set-dtr-quirk-for-broadmobi-bm818.patch queue-6.1/atm-hide-unused-procfs-functions.patch queue-6.1/net-devlink-track-netdev-with-devlink_port-assigned.patch queue-6.1/net-devlink-move-port_type_netdev_checks-call-to-__d.patch queue-6.1/net-sched-sch_clsact-only-create-under-tc_h_clsact.patch queue-6.1/rtnetlink-call-validate_linkmsg-in-rtnl_create_link.patch queue-6.1/mptcp-fix-data-race-around-msk-first-access.patch queue-6.1/net-mellanox-mlxbf_gige-fix-skb_panic-splat-under-me.patch queue-6.1/net-sched-prohibit-regrafting-ingress-or-clsact-qdis.patch queue-6.1/net-netlink-fix-netlink_list_memberships-length-repo.patch queue-6.1/net-devlink-move-port_type_warn_schedule-call-to-__d.patch queue-6.1/tcp-deny-tcp_disconnect-when-threads-are-waiting.patch queue-6.1/mptcp-consolidate-passive-msk-socket-initialization.patch queue-6.1/mptcp-fix-active-subflow-finalization.patch queue-6.1/netrom-fix-info-leak-in-nr_write_internal.patch queue-6.1/rtnetlink-move-ifla_gso_-tb-check-to-validate_linkms.patch queue-6.1/mptcp-add-annotations-around-sk-sk_shutdown-accesses.patch queue-6.1/tls-improve-lockless-access-safety-of-tls_err_abort.patch queue-6.1/mptcp-fix-connect-timeout-handling.patch queue-6.1/rtnetlink-add-the-missing-ifla_gro_-tb-check-in-vali.patch queue-6.1/net-sched-fix-null-pointer-dereference-in-mq_attach.patch queue-6.1/net-sched-reserve-tc_h_ingress-tc_h_clsact-for-ingre.patch queue-6.1/net-add-gso_ipv4_max_size-and-gro_ipv4_max_size-per-.patch