All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Jun Sun <jsun@mvista.com>
Cc: linux-mips@linux-mips.org
Subject: Re: "eth%d" - net dev name in 2.6?
Date: Wed, 10 Mar 2004 15:51:57 +0100	[thread overview]
Message-ID: <20040310145156.GA26629@linux-mips.org> (raw)
In-Reply-To: <20040310023308.GU31326@mvista.com>

On Tue, Mar 09, 2004 at 06:33:08PM -0800, Jun Sun wrote:

> With swarm running on 2.6 I just saw the net dev names are
> not set correctly.  See below.
> 
> eth%d: SiByte Ethernet at 0x10064000, address: 00-02-4C-FE-0C-B2                
> eth%d: enabling TCP rcv checksum                                                
> 
> It appears alloc_netdev() assigns this initial name and nobody
> later resets it to a more meaningful name.  
> 
> Any body has a clue here?  I don't think it is driver's job though ...

It's always the driver :-)

It's referencing net_device->name before register_netdev.

There's plenty of other small candy in that driver, for example in
sbmac_cleanup_module():

                dev = dev_sbmac[idx];
                if (!dev) {
                        struct sbmac_softc *sc = dev->priv;
                        unregister_netdev(dev);
                        sbmac_uninitctx(sc);
                        free_netdev(dev);
                }

Better make sure the pointer is NULL before we dereference it.  We don't
want to miss a crash, do we ;-)

  Ralf

      parent reply	other threads:[~2004-03-10 14:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-10  2:33 "eth%d" - net dev name in 2.6? Jun Sun
2004-03-10  2:53 ` Martin Michlmayr
2004-03-10 14:59   ` Ralf Baechle
2004-03-10  4:14 ` Kumba
2004-03-10 14:59   ` Ralf Baechle
2004-03-10 22:17     ` Kumba
2004-03-10 14:51 ` Ralf Baechle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040310145156.GA26629@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=jsun@mvista.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.