Article View: linux.kernel.netdev
Article #24817[PATCH net-next v3 3/3] net: qualcomm: rmnet: fix TX aggregation timeout overflow on 32-bit
From: Antonio Quartulli
Date: Mon, 30 Nov 2026 22:02
Date: Mon, 30 Nov 2026 22:02
33 lines
10514 bytes
10514 bytes
On 32-bit, time * NSEC_PER_USEC is computed in 32 bits before being
stored in the u64 time_nsec, so a tx-aggr-time-usecs above 4294967
wraps: 5000000 is stored as 705032704 ns and read back as 705032.
Reproducer:
ethtool -C rmnet0 tx-aggr-max-frames 64 tx-aggr-time-usecs 5000000
ethtool -c rmnet0
Do the multiplication in 64 bits.
Fixes: 64b5d1f8f2d1 ("net: qualcomm: rmnet: add tx packets aggregation")
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
---
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
index f862166b0467..e4867e5829c0 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
@@ -695,7 +695,7 @@ void rmnet_map_update_ul_agg_config(struct rmnet_port *port, u32 size,
spin_lock_bh(&port->agg_lock);
port->egress_agg_params.bytes = size;
WRITE_ONCE(port->egress_agg_params.count, count);
- port->egress_agg_params.time_nsec = time * NSEC_PER_USEC;
+ port->egress_agg_params.time_nsec = (u64)time * NSEC_PER_USEC;
spin_unlock_bh(&port->agg_lock);
}
--
2.56.1
Technical Details
Message-ID:
<20261130220200.3378310-4-antonio@mandelbit.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374493-linux-kernel-netdev=dewy.ruReferences:
<20261130220200.3378310-1-antonio@mandelbit.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374493-linux-kernel-netdev=dewy.ru From: antonio@mandelbit.com (Antonio Quartulli) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v3 3/3] net: qualcomm: rmnet: fix TX aggregation timeout overflow on 32-bit Date: Mon, 30 Nov 2026 23:02:00 +0100 Organization: Usenet Network Message-ID: <20261130220200.3378310-4-antonio@mandelbit.com> References: <20261130220200.3378310-1-antonio@mandelbit.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1550571"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:a/O3mshYXRyozcPfueNqXT+Eqsk= sha256:KeTlU46faHnnqQPoD+lEFC+XAVYvm3jLZwhOgoYKxuw= sha1:AKb+gNw4/iuhHNiSxv4KBLtJIVQ= sha256:J3wwMjPlD4JYWLLdOz7RYLhkg2gZW6zYM1Sr0fA7gQk= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 97EB912600E; Tue, 1 Dec 2026 01:02:32 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=mandelbit.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nQ5IBvREIoH2; Tue, 1 Dec 2026 01:02:30 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-374493-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mandelbit.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id A2D0E12600C; Tue, 1 Dec 2026 01:02:21 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 60ED82A6B2; Mon, 30 Nov 2026 22:02:12 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796076130; b=1n0IZl1lMxDYcT6IrZTofSSCQn/ULWNSk/w3PWKM68469+lTyY9DsRUPyPhNZNAbw5yW +08iXj/RDJOCUCMcDLBL/GJz/MgF6hJwsb5rTDAnMpx3ZUn/RBO4yoe/XiQMsPsaZaqjI wHs3o4nuipcdosgK1+ypMxZbasz+7kFpk5tQN85WJJVNJafZ78+CdqQ3X5GBXIfXN7mp2 2+J+3d8+Ifu3KCs2V+erTiuV4wP21+LuV5rCUbDQ2JkAlPNOOAXPQtW03C+r/TyN7ZN0a ROlbLn33M0/h9gXbXiywzA05RYdhxkjdgaon2TyFu+HG2N9pZ6mumiTshaffgeETCwQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796076130; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=J86YpUs3l7E/iaUVDhl8jZK0MM6iDrfJac2Yj9JUawk=; b=FL6FUmFBCg3cN/hjV9a8VMLAxAWirPNa1CpTxbpWGPWzwG1ytJam0cKG7jeWlsNT0K0B tgx5MsNjV3ys0RoLJoiF7zfzbQ718Z9iizavGC7ZU5r60lcUtIKmDIPxnEE9AIDYz0Ycd T5nHWnCERyB68JMT4vhHwxT4dSWfi0t6CkTIPomOCp4bqkQb1ZUSNy6y4EO7uN9A1kdYb JqY0tw8OtKKvhL5cmlwQ7HlO8h3UH4ySEURvx+2sW2BYjaw4wDWlP3Kq++5e6MeGugXhH C/+QVPi6+yGvGOtZy5KwUz9pAbpSRY1AOb91nx8bf8BzWp/ikat5cxc+vMqs/OxL1xw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=i7DVAbPg; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 990A2606A329; Mon, 30 Nov 2026 22:02:10 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=i7DVAbPg X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.61 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796076129; b=cNjH/imfts//VGeBIN10fQ2y1ex4omH1mU4+Nd6s7MJ4AaP0kbIibm2aeTSmkG8aekjV ndyqQkuL+97lTa9rQezTO+kdfwvbWLsrJdJUaV5Y+q4zwDI1EKDgZlTSbiDvfHXFD/Bx8 NLbcVLJMb2V3UIeNn3pFpkzG6UwrkvttrlV8nYC9S0QSAmIfdt0dV/NV4rZO+e+x0hplI 1W2efM73btRFzgyK0GEbBuP0Ju4Yo7I2Ex4MJXGFAzB8hDcB2QygyFOolpnOHC9FqoU0F J3RxlbsYanQB43DQ2PoJmg0+hi3BhbioBwSyxxPOcx1fKta/sBVQnBzFP6XZ3buHuAA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796076129; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=J86YpUs3l7E/iaUVDhl8jZK0MM6iDrfJac2Yj9JUawk=; b=d2EEtwKlDR81bK0i9SvXF5S9ZcSnDG5Wokk/n038NsR9TV2Bc5+NOjtLaO/SrFs8v7DB PoJ8me7IZRoHVaEwSzcafffFytCZxQupy4gfjclVV2wz1xuvtogxagvTtGPHmb594Yyo4 xbEfo5bfQ/gAGe8XFne3RgacwA6JDum9ikgGAmqptYfMX7SIVOoiJM6BecW71GUjTu+ry w2Tjo27Kc/vxip75Xp5HiUyH36k/CewTHklepOo3oxW2GzEoajXMi2PUXoUdnQWAK9QJ+ hKjkjw75QrAztpsXChfATEzXhoElB7EdwMMWeTsmz3DRYXc9NMyV9rxQOBEjIhgZLpw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=i7DVAbPg; arc=none smtp.remote-ip=195.10.208.61 X-Received: from mout-b-201.mailbox.org (mout-b-201.mailbox.org [195.10.208.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46ECA606A32C for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 22:02:09 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 46ECA606A32C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com X-Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-201.mailbox.org (Postfix) with ESMTPS id 4jddKV1xbBzLm8g; Mon, 30 Nov 2026 23:02:06 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1796076126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J86YpUs3l7E/iaUVDhl8jZK0MM6iDrfJac2Yj9JUawk=; b=i7DVAbPgTA81QguPYJCehK984wrlnLwzk05a4C5QrQR5fZ72slxiDnx4yWfdiQIHPvA/Cp i5YZsGj3jO4o2qZXXaov0qgcA8npBIMSTTid6A0Nbn35GBmpg+NLDGLmXWC5r4Uw1mbs3j lIaqMTpeqds2Ry/PWszeuAcTuCjpp2I3br5TNtyrTlAYIs3GEwwZouuduXtF1rmVEOZLjL 9L8lKFOK+s7fqM+9jFIZU8hBInGR2jCL8FqYSVMulmKLIiZekPiVF3UmzkvPuWLifZmOie 1raMeuFoH7ECnSp5IwVE4cUwjYVyT0I6BpJdEhrBPl1tGaDWKAom2G8P7aN6+Q== X-Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of antonio@mandelbit.com designates 2001:67c:2050:b231:465::202 as permitted sender) smtp.mailfrom=antonio@mandelbit.com X-Cc: Subash Abhinov Kasiviswanathan <subash.a.kasiviswanathan@oss.qualcomm.com>, Sean Tranchetti <sean.tranchetti@oss.qualcomm.com>, Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Daniele Palmas <dnlplm@gmail.com>, Koen Vandeputte <koen.vandeputte@citymesh.com>, Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>, Antonio Quartulli <antonio@mandelbit.com> X-Mailer: git-send-email 2.56.1 X-In-Reply-To: <20261130220200.3378310-1-antonio@mandelbit.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-Rspamd-Queue-Id: 4jddKV1xbBzLm8g