[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHXqBFLQau4iROXA=GL9EQFYJpRGJHpkuW7knt=9YfSqz+_XRQ@mail.gmail.com>
Date: Mon, 7 Jan 2013 18:20:58 +0100
From: Michał Mirosław <mirqus@...il.com>
To: Stanislaw Gruszka <sgruszka@...hat.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Ben Greear <greearb@...delatech.com>,
Bjørn Mork <bjorn@...k.no>,
linux-wireless@...r.kernel.org,
Ben Hutchings <bhutchings@...arflare.com>
Subject: Re: [PATCH repost] net,wireless: check against default_ethtool_ops
2013/1/7 Stanislaw Gruszka <sgruszka@...hat.com>:
> Since:
>
> commit 2c60db037034d27f8c636403355d52872da92f81
> Author: Eric Dumazet <edumazet@...gle.com>
> Date: Sun Sep 16 09:17:26 2012 +0000
>
> net: provide a default dev->ethtool_ops
>
> wireless core does not correctly assign ethtool_ops. In order to fix
> the problem, and avoid assigning ethtool_ops on each individual cfg80211
> drivers, we check against default_ethool_ops pointer instead of NULL in
> wireless core.
[...]
You could instead move the assignment of default ethtool_ops to just after
call_netdevice_notifiers(NETDEV_REGISTER) in register_netdevice() or
just after call_netdevice_notifiers(NETDEV_POST_INIT) and initialize the default
wireless ethtool_ops in NETDEV_POST_INIT hook. That will avoid the export.
Either way is good because register_netdevice() is called under RTNL, so
ethtool_ops can't be called until it returns. NETDEV_POST_INIT seams more
natural to me, but it's not a strong opinion.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists