diff mbox series

iwd: Add missing module dependencies

Message ID 20220715151442.5355-1-denkenz@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show
Series iwd: Add missing module dependencies | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-alpine-ci-fetch success Fetch PR
prestwoj/iwd-ci-gitlint fail iwd: Add missing module dependencies 9: B1 Line exceeds max length (84>80): " #2 0x0000aaaab7523f50 in netdev_connect_free (netdev=netdev@entry=0xaaaac3a13db0)" 11: B1 Line exceeds max length (93>80): " #3 0x0000aaaab7526208 in netdev_free (data=0xaaaac3a13db0) at ../iwd-1.28/src/netdev.c:909" 13: B1 Line exceeds max length (88>80): " destroy=destroy@entry=0xaaaab7526190 <netdev_free>) at ../iwd-1.28/ell/queue.c:107" 15: B1 Line exceeds max length (87>80): " destroy=destroy@entry=0xaaaab7526190 <netdev_free>) at ../iwd-1.28/ell/queue.c:82" 22: B1 Line exceeds max length (95>80): "Jul 14 18:14:39 localhost iwd[2867]: ../iwd-1.28/src/wiphy.c:wiphy_free() Freeing wiphy phy0[0]" 23: B1 Line exceeds max length (100>80): "Jul 14 18:14:39 localhost iwd[2867]: ../iwd-1.28/src/netdev.c:netdev_free() Freeing netdev wlan0[45]"
prestwoj/iwd-ci-fetch success Fetch PR
prestwoj/iwd-alpine-ci-makedistcheck success Make Distcheck
prestwoj/iwd-alpine-ci-incremental_build success Incremental build not run PASS
prestwoj/iwd-alpine-ci-build success Build - Configure
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-incremental_build success Incremental build not run PASS
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-alpine-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-alpine-ci-makecheck success Make Check
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-testrunner success test-runner PASS

Commit Message

Denis Kenzior July 15, 2022, 3:14 p.m. UTC
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]
---
 src/netdev.c     | 2 ++
 src/offchannel.c | 1 +
 src/rrm.c        | 1 +
 src/scan.c       | 1 +
 src/station.c    | 4 +++-
 5 files changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/netdev.c b/src/netdev.c
index ece2aab39a10..5a6a7b703b51 100644
--- 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
index c6fed569b30e..80d4ad5618f0 100644
--- 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
index d32ffbff4237..311e62fbe5d3 100644
--- 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
index cc6e682c93ee..241fecbb05e6 100644
--- 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
index e5972269a92f..02f21c764fe4 100644
--- 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);