commit b84b71042bbf80d727f2e7951db7d0031c2f4782
parent f807901c47e6814e08515a4adbc4bd57752c64bc
Author: Denis Kenzior <denkenz@gmail.com>
Date: Thu, 14 Jul 2022 23:38:18 -0500
iwd: Add missing module dependencies
Certain module dependencies were missing, which could cause a crash on
exit under (very unlikely) circumstances.
#0 l_queue_peek_head (queue=<optimized out>) at ../iwd-1.28/ell/queue.c:241
#1 0x0000aaaab752f2a0 in wiphy_radio_work_done (wiphy=0xaaaac3a129a0, id=6)
at ../iwd-1.28/src/wiphy.c:2013
#2 0x0000aaaab7523f50 in netdev_connect_free (netdev=netdev@entry=0xaaaac3a13db0)
at ../iwd-1.28/src/netdev.c:765
#3 0x0000aaaab7526208 in netdev_free (data=0xaaaac3a13db0) at ../iwd-1.28/src/netdev.c:909
#4 0x0000aaaab75a3924 in l_queue_clear (queue=queue@entry=0xaaaac3a0c800,
destroy=destroy@entry=0xaaaab7526190 <netdev_free>) at ../iwd-1.28/ell/queue.c:107
#5 0x0000aaaab75a3974 in l_queue_destroy (queue=0xaaaac3a0c800,
destroy=destroy@entry=0xaaaab7526190 <netdev_free>) at ../iwd-1.28/ell/queue.c:82
#6 0x0000aaaab7522050 in netdev_exit () at ../iwd-1.28/src/netdev.c:6653
#7 0x0000aaaab7579bb0 in iwd_modules_exit () at ../iwd-1.28/src/module.c:181
In this particular case, wiphy module was de-initialized prior to the
netdev module:
Jul 14 18:14:39 localhost iwd[2867]: ../iwd-1.28/src/wiphy.c:wiphy_free() Freeing wiphy phy0[0]
Jul 14 18:14:39 localhost iwd[2867]: ../iwd-1.28/src/netdev.c:netdev_free() Freeing netdev wlan0[45]
Diffstat:
5 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/netdev.c b/src/netdev.c
@@ -6676,3 +6676,5 @@ void netdev_shutdown(void)
IWD_MODULE(netdev, netdev_init, netdev_exit);
IWD_MODULE_DEPENDS(netdev, eapol);
+IWD_MODULE_DEPENDS(netdev, frame_xchg);
+IWD_MODULE_DEPENDS(netdev, wiphy);
diff --git a/src/offchannel.c b/src/offchannel.c
@@ -322,3 +322,4 @@ static void offchannel_exit(void)
}
IWD_MODULE(offchannel, offchannel_init, offchannel_exit);
+IWD_MODULE_DEPENDS(offchannel, wiphy);
diff --git a/src/rrm.c b/src/rrm.c
@@ -890,3 +890,4 @@ static void rrm_exit(void)
IWD_MODULE(rrm, rrm_init, rrm_exit);
IWD_MODULE_DEPENDS(rrm, netdev);
+IWD_MODULE_DEPENDS(rrm, frame_xchg);
diff --git a/src/scan.c b/src/scan.c
@@ -2198,3 +2198,4 @@ static void scan_exit(void)
}
IWD_MODULE(scan, scan_init, scan_exit)
+IWD_MODULE_DEPENDS(scan, wiphy)
diff --git a/src/station.c b/src/station.c
@@ -4614,4 +4614,6 @@ static void station_exit(void)
IWD_MODULE(station, station_init, station_exit)
IWD_MODULE_DEPENDS(station, netdev);
-IWD_MODULE_DEPENDS(station, netconfig)
+IWD_MODULE_DEPENDS(station, netconfig);
+IWD_MODULE_DEPENDS(station, frame_xchg);
+IWD_MODULE_DEPENDS(station, wiphy);