* [PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race
@ 2026-11-01 23:34 Jérémy Jean
2026-11-01 23:39 ` netdev-bot+sinfo
0 siblings, 1 reply; 2+ messages in thread
From: Jérémy Jean @ 2026-11-01 23:34 UTC (permalink / raw)
To: Subash Abhinov Kasiviswanathan, Sean Tranchetti
Cc: netdev, linux-kernel, Jérémy Jean, stable
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
There is a race in rmnet_unregister_real_device() because it cancels TX
aggregation before unregistering the rx handler. A transmit that already
obtained the port through rmnet_get_port_rcu() can wait on port->agg_lock,
then create a new aggregate and rearm the timer after
rmnet_map_tx_aggregate_exit() has drained it. The timer can later queue
work on the freed port.
Unregister the rx handler first so that no reader can rearm aggregation
after rmnet_map_tx_aggregate_exit() drains it.
Fixes: 64b5d1f8f2d1 ("net: qualcomm: rmnet: add tx packets aggregation")
Cc: stable@vger.kernel.org
Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
---
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
index 61b04c6c0390..2ff4b9519139 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
@@ -40,10 +40,10 @@ static int rmnet_unregister_real_device(struct net_device *real_dev)
if (port->nr_rmnet_devs)
return -EINVAL;
- rmnet_map_tx_aggregate_exit(port);
-
netdev_rx_handler_unregister(real_dev);
+ rmnet_map_tx_aggregate_exit(port);
+
kfree(port);
netdev_dbg(real_dev, "Removed from rmnet\n");
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race
2026-11-01 23:34 [PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race Jérémy Jean
@ 2026-11-01 23:39 ` netdev-bot+sinfo
0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-11-01 23:39 UTC (permalink / raw)
To: Jérémy Jean
Cc: Subash Abhinov Kasiviswanathan, Sean Tranchetti, netdev,
linux-kernel, stable
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during
development, syzbot report, manual code inspection, LLM or static
analysis tool scan.
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by code inspection). If it was triggered please include
the symptoms, like the stack trace or error messages.
- What hardware the change was tested on. For driver fixes please
mention the device (and if relevant firmware version) used for
testing, or say that the change was not tested on real hardware.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-01 23:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-01 23:34 [PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race Jérémy Jean
2026-11-01 23:39 ` netdev-bot+sinfo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox