Search Linux Wireless

Commit "mac80211: fix race in ieee80211_register_hw()" breaks mac80211 debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Since commit 52e04b4ce5d0 ("mac80211: fix race in
ieee80211_register_hw()") the debugfs entries for mac80211 drivers are
broken.
https://git.kernel.org/linus/52e04b4ce5d03775b6a78f3ed1097480faacc9fd

Felix reported that the file /sys/kernel/debug/ieee80211/phy0/rc is now
located at /sys/kernel/debug/rc.

Before this commit we had the following flow:
1. wiphy_register()
  -> creates /sys/kernel/debug/ieee80211/phy0/
  -> fill rdev->wiphy.debugfsdir pointer
2. ieee80211_init_rate_ctrl_alg()
  -> call rate_control_alloc()
    -> use rdev->wiphy.debugfsdir pointer to
       create /sys/kernel/debug/ieee80211/phy0/rc/

This works like expected.


With the commit the flow in ieee80211_register_hw() is the other way around:
2. ieee80211_init_rate_ctrl_alg()
  -> call rate_control_alloc()
    -> use rdev->wiphy.debugfsdir pointer (now NULL) to
       create /sys/kernel/debug/rc/
2. wiphy_register()
  -> creates /sys/kernel/debug/ieee80211/phy0/
  -> fill rdev->wiphy.debugfsdir pointer


This patch was backported to multiple stable kernel versions:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.4.y&id=a8ce3412e8a22279e1bdc81c3c2bacd3785c1577

Hauke



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux