* [PATCH net] net: ena: reset the device before freeing admin queues on restore error
@ 2026-11-30 0:06 Yuho Choi
2026-11-30 0:08 ` netdev-bot+sinfo
0 siblings, 1 reply; 2+ messages in thread
From: Yuho Choi @ 2026-11-30 0:06 UTC (permalink / raw)
To: Arthur Kiyanovski, David Arinzon, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel, Yuho Choi
The ena_restore_device() error path frees the admin queues before it
resets the device, so the device can still write AENQ events, such as
the keep-alive, into freed memory. Reset the device first, as
ena_destroy_device() does.
Fixes: d7703ddbd7c9 ("net: ena: fix rare bug when failed restart/resume is followed by driver removal")
Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>
---
I used an LLM to help write this patch and its changelog.
Compile-tested only: QEMU has no ENA device, and KASAN cannot see
writes made by the device.
drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 560b20a5861c..5ef9c0967bb4 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -3370,8 +3370,8 @@ int ena_restore_device(struct ena_adapter *adapter)
err_device_destroy:
ena_com_abort_admin_commands(ena_dev);
ena_com_wait_for_abort_completion(ena_dev);
- ena_com_admin_destroy(ena_dev);
ena_com_dev_reset(ena_dev, ENA_REGS_RESET_DRIVER_INVALID_STATE);
+ ena_com_admin_destroy(ena_dev);
ena_phc_destroy(adapter);
ena_com_mmio_reg_read_request_destroy(ena_dev);
err:
base-commit: fad0d57b12f6979bc0127f0a4f704c6d7177ca78
--
2.56.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH net] net: ena: reset the device before freeing admin queues on restore error
2026-11-30 0:06 [PATCH net] net: ena: reset the device before freeing admin queues on restore error Yuho Choi
@ 2026-11-30 0:08 ` netdev-bot+sinfo
0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-11-30 0:08 UTC (permalink / raw)
To: Yuho Choi
Cc: Arthur Kiyanovski, David Arinzon, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
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.
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.
*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
--
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-30 0:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 0:06 [PATCH net] net: ena: reset the device before freeing admin queues on restore error Yuho Choi
2026-11-30 0:08 ` 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
all inboxes | Powered by JetHome®