Re: oops with recent wireless-dev tree

2 messages, 2 authors, 2007-08-30 · open the first message on its own page

Re: oops with recent wireless-dev tree

From: Johannes Berg <hidden>
Date: 2007-08-30 12:05:30

Hi Jochen,

[added CCs since it affects bridge code]
If I read this correctly, the EIP in the last line corresponds to
net/bridge/br_if.c, line 36:

    static int port_cost(struct net_device *dev)
    {
	    if (dev->ethtool_ops->get_settings) {
                               ^^^^

As far as I can figure out, dev->ethtool_ops is NULL and the crash
happens while trying to derefernce ...->get_settings.

Is dev->ethtool_ops allowed to be NULL?  In this case the appended
patch might be the correct fix.  At least it makes the oops disappear
for me.  Another possible fix would be to add an ethtool_ops structure
to the device created by b43.
I don't think adding ethtool_ops in mac80211 should be necessary.
Stephen?

johannes

Re: oops with recent wireless-dev tree

From: Stephen Hemminger <hidden>
Date: 2007-08-30 14:49:49

On Thu, 30 Aug 2007 14:05:30 +0200
Johannes Berg [off-list ref] wrote:
Hi Jochen,

[added CCs since it affects bridge code]
quoted
If I read this correctly, the EIP in the last line corresponds to
net/bridge/br_if.c, line 36:

    static int port_cost(struct net_device *dev)
    {
	    if (dev->ethtool_ops->get_settings) {
                               ^^^^

As far as I can figure out, dev->ethtool_ops is NULL and the crash
happens while trying to derefernce ...->get_settings.

Is dev->ethtool_ops allowed to be NULL?  In this case the appended
patch might be the correct fix.  At least it makes the oops disappear
for me.  Another possible fix would be to add an ethtool_ops structure
to the device created by b43.
I don't think adding ethtool_ops in mac80211 should be necessary.
Stephen?
Devices aren't required to have ethtool_ops. The code there used to
call ethtool directly, and it would handle the error cases. I'll rollup
a fix this morning.

The bug was introduced by this:

commit 61a44b9c4b20d40c41fd1b70a4ceb13b75ea79a4
Author: Matthew Wilcox [off-list ref]
Date:   Tue Jul 31 14:00:02 2007 -0700

    [NET]: ethtool ops are the only way
    
    During the transition to the ethtool_ops way of doing things, we supported
    calling the device's ->do_ioctl method to allow unconverted drivers to
    continue working.  Those days are long behind us, all in-tree drivers
    use the ethtool_ops way, and so we no longer need to support this.
    
    The bonding driver is the biggest beneficiary of this; it no longer
    needs to call ioctl() as a fallback if ethtool_ops aren't supported.
    
    Also put a proper copyright statement on ethtool.c.
    
    Signed-off-by: Matthew Wilcox [off-list ref]
    Signed-off-by: David S. Miller [off-list ref]

-- 
Stephen Hemminger [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help