Search Linux Wireless

Re: [PATCH] mac80211: Prevent unregistering of unregistered hw

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

 



On Fri, 2007-03-09 at 17:30 +0100, Ivo van Doorn wrote:

> Well it occurred in rt2x00 during errors during initialization,
> instead of using goto's to step by step free all allocated memory and unregistration
> the main free_dev() was called.

Change that then, we like to see a proper error handling strategy that
one can understand w/o checking all possible flags.

>  And there isn't a way for the driver to check
> if the hw has been registered or not without creating new flags for it.
> But since mac80211 already is using such a flag internally, it would sound like
> more sense to make the check in there.

No, the driver should know from its code flow whether it has registered
it or not, it should be obvious by looking at it.

> > I smell design problems in the driver ;)
> 
> True, there are different approaches to take care of this inside the driver,
> but I think this check is sane enough as well. ;)

I disagree. In fact, I'd prefer putting
 BUG_ON(local->reg_state != IEEE80211_DEV_REGISTERED)
into ieee80211_unregister_hw.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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