aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/rust/pin-init/internal/src
diff options
context:
space:
mode:
authorJordan Rhee <jordanrhee@google.com>2025-08-18 14:12:45 -0700
committerJakub Kicinski <kuba@kernel.org>2025-08-19 18:04:07 -0700
commit75a9a46d67f46d608205888f9b34e315c1786345 (patch)
tree59ad75d9642bdf12da41e00841607d0e6ca0999f /rust/pin-init/internal/src
parentnet: usb: asix_devices: Fix PHY address mask in MDIO bus initialization (diff)
downloadwireguard-linux-75a9a46d67f46d608205888f9b34e315c1786345.tar.xz
wireguard-linux-75a9a46d67f46d608205888f9b34e315c1786345.zip
gve: prevent ethtool ops after shutdown
A crash can occur if an ethtool operation is invoked after shutdown() is called. shutdown() is invoked during system shutdown to stop DMA operations without performing expensive deallocations. It is discouraged to unregister the netdev in this path, so the device may still be visible to userspace and kernel helpers. In gve, shutdown() tears down most internal data structures. If an ethtool operation is dispatched after shutdown(), it will dereference freed or NULL pointers, leading to a kernel panic. While graceful shutdown normally quiesces userspace before invoking the reboot syscall, forced shutdowns (as observed on GCP VMs) can still trigger this path. Fix by calling netif_device_detach() in shutdown(). This marks the device as detached so the ethtool ioctl handler will skip dispatching operations to the driver. Fixes: 974365e51861 ("gve: Implement suspend/resume/shutdown") Signed-off-by: Jordan Rhee <jordanrhee@google.com> Signed-off-by: Jeroen de Borst <jeroendb@google.com> Link: https://patch.msgid.link/20250818211245.1156919-1-jeroendb@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/pin-init/internal/src')
0 files changed, 0 insertions, 0 deletions