Search Linux Wireless

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

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

 



On Thu, 23 Apr 2020 at 14:29, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
>
> On Thu, 2020-04-23 at 14:27 +0530, Sumit Garg wrote:
>
> > > > +++ b/net/wireless/core.c
> > > > @@ -473,6 +473,10 @@ struct wiphy *wiphy_new_nm(const struct
> > > > cfg80211_ops *ops, int sizeof_priv,
> > > >                 }
> > > >         }
> > > >
> > > > +       /* add to debugfs */
> > > > +       rdev->wiphy.debugfsdir = debugfs_create_dir(wiphy_name(&rdev->wiphy),
> > > > +                                                   ieee80211_debugfs_dir);
> > >
> > > This cannot work, we haven't committed to the name of the wiphy yet at
> > > this point.
> >
> > Maybe I am missing something, can you please elaborate here?
> >
> > Looking at the code, the default or requested wiphy name is configured
> > just above this and the rename API "cfg80211_dev_rename()" takes care
> > of renaming wiphy debugfs directory too.
>
> Yes, but I think wiphy_register() can still fail at this point, due to
> name clashes or so?
>
> In any case, it'd be very strange to have a debugfs entry around when
> the wiphy doesn't exist yet, and could possibly cause the same issue
> that you fixed again, just through debugfs accesses?
>

Now I understood your point. Yeah it's definitely better to expose
debugfs after the wiphy device is registered.

> Can you take a look at the patch I sent?

Sure I will take a look.

-Sumit

>
> johannes
>



[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