Uncancelled timeout in driver_ndis
Vincent Maurin
vincent.maurin
Mon Aug 28 03:21:53 PDT 2006
Hello,
I use wpa supplicant in a Visual Studio project (in C#). I call directly
main function to associate, add interface, ....
It works fine
I had memory error when I unplugged my usb wifi adapter while it was
associated.
I had searched in the code, debugging and the problem was that some
timeout set by the ndis driver weren't cancelled when I removed the
disappeared interface, so when the timer expired, It try to access to an
destroyed wpa_supplicant structure.
In wpa_driver_ndis_scan, this timeout is set
00580 eloop_register_timeout
<http://hostap.epitest.fi/wpa_supplicant/devel/eloop_8c.html#a12>(3, 0,
wpa_driver_ndis_scan_timeout, drv,
00581 drv->ctx);
In wpa_driver_ndis_deinit, it's not cancelled
01759 eloop_cancel_timeout
<http://hostap.epitest.fi/wpa_supplicant/devel/eloop_8c.html#a13>(wpa_driver_ndis_poll_timeout,
drv, NULL);
In my code I add
eloop_cancel_timeout
<http://hostap.epitest.fi/wpa_supplicant/devel/eloop_8c.html#a13>(wpa_driver_ndis_scan_timeout,
drv, drv->ctx);
to resolve the problem.
I wonder if it's my use of wpa supplicant which causes this problem, or
if it can occur on normal use (then it's a bug)
More information about the Hostap
mailing list