Commit a13b6860 authored by Cody Schuffelen's avatar Cody Schuffelen
Browse files

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: default avatarA. Cody Schuffelen <schuffelen@google.com>
Acked-by: default avatarGreg Hartman <ghartman@google.com>
parent 207b6afb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment