From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f202.google.com (mail-qt1-f202.google.com [209.85.160.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B043275864 for ; Mon, 16 Feb 2026 19:36:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771270617; cv=none; b=j8BEWVkXS6S9eFO86b/SH/35dv/6uW7/gggLbqkdUzgpCWbeTXU287e0ejfe1Gx/eFKLRbFFZ99/WjT/vQsUUukT25tMmfqZ8yQ/g/vg3x4MWY8IdkfNlpPd+reEQH+QdwTfoYzxmsi4MPKgRDjywQINGzpu9QZKBxWz/rdeOhg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771270617; c=relaxed/simple; bh=Bc28nxKhZv3QCDRdkRDy9/eVhgEmC9sqfmbBVX5Z1is=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=o4oyhoTdyCvh4XBrKe5Dfo+Lga+vGIUa3/8rwg3H/Oz+DWO1gh0fAqTQrYzfu2JIE5wHKWw42DsSy3lXayBSbvgULa9z4SKveafIKthDx0K/D7WRLhgXz32SVJOXJ1OHeQkPz8j+z0RXmkInXmuQPj5ySKAcXMLJqJOV3zu0p5A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--edumazet.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=LVOlCxNM; arc=none smtp.client-ip=209.85.160.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--edumazet.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="LVOlCxNM" Received: by mail-qt1-f202.google.com with SMTP id d75a77b69052e-506b839cafaso24327651cf.3 for ; Mon, 16 Feb 2026 11:36:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1771270615; x=1771875415; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=d6j6Hfy9UZtJQFxwFk3EgZdpOqO6OFUb9VGms3uyiGA=; b=LVOlCxNM+oDvaq1tJcXTZQKoOpvRcpivxKaBvWlvwv+bTXnE8/6xk+/ZlWrF2zeLDk HVCtHYPjuiW0355W/4Usowb764xVckWJX3L6h1norsumxe4cPkbEXX22eCWhF+vMP4HU I1MXORQ3ctx7Uh6Z7mcdJjjy70V2BuaxOjUhRVynV4NxjNltp3+1gXDdB78LBZzvEKhN ONgrjjkckg4xhOElJN+J66rUTOBTnUAcJpH7CGULJHN1EhvPcdqstkXjaWrfs0B3NHrP Ar69M1mjLVecKZ2epioasYvz7T4KQZf7PBonn9dNj5ho6LUU8ltp+sp9bIyP6BOwcGF4 ls0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771270615; x=1771875415; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=d6j6Hfy9UZtJQFxwFk3EgZdpOqO6OFUb9VGms3uyiGA=; b=c4b0BJUlGe0oIXgFK6TE5+F0ZehAP5gsHgTx/DkJL65CvthFh0eYny8cTDiP6v+jkg 9q1C2DqeFKlAPsbvs+FI7gTj5lMboWrcBiRs9FSqiROJf7Nejgi4NYfe2IAWASvKoq5D +xGp5wQP5D4xnMUsDAr8C70XnB5Ofe/6HT/qaWYuvoXdwkB3lVvlssu0e7dswU2t+fNd GAIelquPNXHVz/drXV093sf0LTY4EeZmO54gsG4lb1nMopSwd0RJWspsKMoVOnm59NQT 5zSFQtFG+YO7PuFO1Eb96ws7AHXEehyT67qujj/HqQm5rcYdZOSQTaLtnnpF3anUk20P LoJA== X-Forwarded-Encrypted: i=1; AJvYcCXgzMgqauxtiNtBtrA1SPU3HwM7Cc65H8ZIbmgAH9euXuz89dGMZZ2gLeYQ3d47IIkJ2cuFNRA=@vger.kernel.org X-Gm-Message-State: AOJu0YyLWFcLSuvIS2pOhEyx1NwZpC/+8qfufmRAY96HGSxCibkVj4Hi MM2gus+QuwHAtMZnbz5d1rUL2xCDX7/Nq8/2blAXMBy90rBWC/9oIptaeFkywOqtVEfyjrbRlpP 4efYNmEo28TuNbA== X-Received: from qtxv21.prod.google.com ([2002:a05:622a:1455:b0:4f0:96d:f258]) (user=edumazet job=prod-delivery.src-stubby-dispatcher) by 2002:a05:622a:180a:b0:502:6ed5:7b04 with SMTP id d75a77b69052e-506a836818emr140422311cf.74.1771270614831; Mon, 16 Feb 2026 11:36:54 -0800 (PST) Date: Mon, 16 Feb 2026 19:36:53 +0000 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.53.0.310.g728cabbaf7-goog Message-ID: <20260216193653.627617-1-edumazet@google.com> Subject: [PATCH net] net: do not delay zero-copy skbs in skb_attempt_defer_free() From: Eric Dumazet To: "David S . Miller" , Jakub Kicinski , Paolo Abeni Cc: Simon Horman , Kuniyuki Iwashima , Willem de Bruijn , netdev@vger.kernel.org, eric.dumazet@gmail.com, Eric Dumazet Content-Type: text/plain; charset="UTF-8" After the blamed commit, TCP tx zero copy notifications could be arbitrarily delayed and cause regressions in applications waiting for them. Signed-off-by: Eric Dumazet Fixes: e20dfbad8aab ("net: fix napi_consume_skb() with alien skbs") --- net/core/skbuff.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 699c401a5eae9c497a42b6bdd8593af7890529f4..dc47d3efc72ed86dce5e382d505eda7bc863669a 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -7266,10 +7266,15 @@ void skb_attempt_defer_free(struct sk_buff *skb) { struct skb_defer_node *sdn; unsigned long defer_count; - int cpu = skb->alloc_cpu; unsigned int defer_max; bool kick; + int cpu; + /* zero copy notifications should not be delayed. */ + if (skb_zcopy(skb)) + goto nodefer; + + cpu = skb->alloc_cpu; if (cpu == raw_smp_processor_id() || WARN_ON_ONCE(cpu >= nr_cpu_ids) || !cpu_online(cpu)) { -- 2.53.0.310.g728cabbaf7-goog