Search Linux Wireless

Re: Oops and other problems in cfg80211

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

 



On Mon, Mar 16, 2009 at 10:23 AM, Quentin Armitage
<Quentin@xxxxxxxxxxxxxxx> wrote:
> If cfg80211 is compiled with CONFIG_WIRELESS_OLD_REGULATORY defined, if
> insmod is loaded with "insmod cfg80211 ieee80211_regdom=EU" then the
> execution of insmod mac80211, executing insmod ath5k causes an oops.
> This is caused by wiphy_update_regulatory being called when last_request
> == NULL, and the call of reg_is_world_roaming (via reg_process_beacons)
> causes the oops at last_request->initiator != REGDOM_SET_BY_COUNTRY_IE.
>
> If reg_is_world_roaming is modified to check for last_request not being
> NULL, e.g.
> if (last_request && last_request->initiator != REGDOM_SET_BY_COUNTRY_IE
> &&
> then I also get an oops in reg_device_remove where last_request is
> referenced and there is only a subsequent check for it being NULL.
>
> Even if the above two are fixed, it will not associate with the access
> point, and `iwlist wlan0 channels` produces a rather confused list. It
> appears that, despite the comment, in regulatory_init it is necessary to
> call regulatory_hint_core even for the pseudo country EU.

Yes, good catch, the entire code in reg.c assumes this was always
done. We overlooked the fact when "EU" became the only exemption.

> Patch1 below covers the points above, although I am not sure how useful
> the BUG_ON (!last_request) in reg_is_world_roaming is.

Its better to understand the code than sprinkle random BUG_ONs, and in
this particular case you've already found the issue. So lets address
and fix that appropriately.

> Having modified the above, I then found that the regulatory domain was
> not being updated from the Country IE sent by the access point.
>  It
> appears that the code following the comment "so we optimize an early
> check ..." in regulatory_hint_11d is a little over optimized, since if
> the following if statement is true, every path through that block ends
> in "goto out;". Patch 2 below allows the Country IE to be processed
> (note it also needs an extra check around a WARN_ON, and so the
> preceeding comment to that needs considering).

Thanks for reporting this as well, as you noted we didn't check for
the last_request type and just made an assumption. The check should go
on earlier.

Will spin some patches to address this. The right solution really is
to abandon OLD_REG, but that won't happen for stable right now so will
spin some patches to address this for stable.

Thanks,

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux