Clean up ongoing virt_wifi scans on wifi shutdown.
When a scan on a wiphy is running and its net_device goes down, the kernel will pass a WARN_ON line and forcibly shut down the scan. This frees the scan request memory, so any use of the scan request object after this is a use-after-free error. Before this change, virt_wifi did not react to wifi shutdown and attempted to normally complete all its scans. This would cause a kernel crash and device shutdown if the device was shut down while a scan was ongoing. This change causes it to react to net_device shutdowns and forcibly abort any running scans. The delayed scan result then does not complete the scan operation if it is already aborted. Bug: 117242209 Change-Id: Iab322ea57b6783cc838236f484a46b0afde3dab7 Signed-off-by:A. Cody Schuffelen <schuffelen@google.com> Acked-by:
Greg Hartman <ghartman@google.com>
Loading
Please sign in to comment