Search Linux Wireless

Re: [PATCH 01/10] mac80211: introduce channel context skeleton code

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

 



On Sun, 2012-09-16 at 00:42 +0300, Eliad Peller wrote:

> > +       ctx = ieee80211_find_chanctx(local, channel, channel_type, mode);
> since you might use an existing ctx here...
> 
> > +       if (!ctx)
> > +               ctx = ieee80211_new_chanctx(local, channel, channel_type, mode);
> > +       if (IS_ERR(ctx)) {
> > +               ret = PTR_ERR(ctx);
> > +               goto out;
> > +       }
> > +
> > +       ret = ieee80211_assign_vif_chanctx(sdata, ctx);
> > +       if (ret) {
> > +               ieee80211_free_chanctx(local, ctx);
> i think you should check ctx->refcount before freeing it.

Oops, good catch! I think I'll just add a test here rather than Arend's
suggestion because nothing it's called _free_chanctx(), and it's already
very indirectly used via the vif. Not that it's a bad suggestion, it
just doesn't seem to fit with the code as it is now.

Thanks guys!

johannes

--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux