Thread View: linux.kernel.netdev
7 messages
7 total messages
Started by Jérémy Jean
Sun, 01 Nov 2026 23:34
[PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race
Author: Jérémy Jean
Date: Sun, 01 Nov 2026 23:34
Date: Sun, 01 Nov 2026 23:34
37 lines
10641 bytes
10641 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
Re: [PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race
Author: netdev-bot+sinfo
Date: Sun, 01 Nov 2026 23:39
Date: Sun, 01 Nov 2026 23:39
26 lines
8830 bytes
8830 bytes
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.
RE: [PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race
Author: subash.a.kasiviswanathan
Date: Sun, 08 Nov 2026 07:32
Date: Sun, 08 Nov 2026 07:32
60 lines
17046 bytes
17046 bytes
> -----Original Message-----
> From: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
> Sent: Sunday, November 1, 2026 4:34 PM
> To: Subash Abhinov Kasiviswanathan
> <subash.a.kasiviswanathan@oss.qualcomm.com>; Sean Tranchetti
> <sean.tranchetti@oss.qualcomm.com>
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jérémy Jean
> <Jeremy.Jean@oss.cyber.gouv.fr>; stable@vger.kernel.org
> Subject: [PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race
>
> 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
Reviewed-by: Subash Abhinov Kasiviswanathan <subash.a.kasiviswanathan@oss.qualcomm.com>
Re: [PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race
Author: Simon Horman
Date: Sun, 08 Nov 2026 15:03
Date: Sun, 08 Nov 2026 15:03
32 lines
9209 bytes
9209 bytes
On Sun, Nov 01, 2026 at 11:39:11PM +0000, netdev-bot+sinfo@kernel.org wrote: > 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. Hi Jérémy, As per similar requests for other patches, I would appreciate it if you could take a moment to respond to the questions posed by the bot above.
Re: [PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race
Author: Jérémy Jean
Date: Sun, 08 Nov 2026 15:18
Date: Sun, 08 Nov 2026 15:18
39 lines
11362 bytes
11362 bytes
On 2026-11-08 16:03, Simon Horman wrote: > On Sun, Nov 01, 2026 at 11:39:11PM +0000, netdev-bot+sinfo@kernel.org > wrote: >> 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. > > Hi Jérémy, > > As per similar requests for other patches, I would appreciate it if you > could take a moment to respond to the questions posed by the bot above. * The bug was found by LLM-assisted code review. * The bug was triggered by a software reproducer with a KASAN enabled kernel under QEMU VM. * It has not been tested on real hardware.
Re: [PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race
Author: Simon Horman
Date: Sun, 08 Nov 2026 16:41
Date: Sun, 08 Nov 2026 16:41
44 lines
9815 bytes
9815 bytes
On Sun, Nov 08, 2026 at 04:18:25PM +0100, Jérémy Jean wrote: > On 2026-11-08 16:03, Simon Horman wrote: > > On Sun, Nov 01, 2026 at 11:39:11PM +0000, netdev-bot+sinfo@kernel.org > > wrote: > > > 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. > > > > Hi Jérémy, > > > > As per similar requests for other patches, I would appreciate it if you > > could take a moment to respond to the questions posed by the bot above. > > * The bug was found by LLM-assisted code review. > * The bug was triggered by a software reproducer with a KASAN enabled > kernel under QEMU VM. > * It has not been tested on real hardware. Thanks for the update Jérémy, much appreciated. Reviewed-by: Simon Horman <horms@kernel.org>
Re: [PATCH net] net: qualcomm: rmnet: fix TX aggregation teardown race
Author: patchwork-bot+netdevbpf
Date: Tue, 10 Nov 2026 02:55
Date: Tue, 10 Nov 2026 02:55
24 lines
8645 bytes
8645 bytes
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sun, 1 Nov 2026 23:34:28 +0000 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net] net: qualcomm: rmnet: fix TX aggregation teardown race
https://git.kernel.org/netdev/net-next/c/0af0e210b5bd
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads