From: Roland Dreier <rdreier@cisco.com>
To: David Miller <davem@davemloft.net>
Cc: shemminger@vyatta.com, arjan@infradead.org, netdev@vger.kernel.org
Subject: Re: Printing the driver name as part of the netdev watchdog message
Date: Mon, 07 Jul 2008 15:45:38 -0700 [thread overview]
Message-ID: <adafxqlxqi5.fsf@cisco.com> (raw)
In-Reply-To: <20080706.182243.65603166.davem@davemloft.net> (David Miller's message of "Sun, 06 Jul 2008 18:22:43 -0700 (PDT)")
> > For consistency each call through ethtool_ops should
> > be holding rtnl mutex. And since dev_watchdog is a timer routine,
> > it is not safe to acquire a mutex there.
>
> I think "get driver info", which does nothing but copy strings out of
> the driver software state, is a safe exception to these strict locking
> rules.
it seems that's not universally the case, eg get_drvinfo() in
drivers/net/cxgb3/cxgb3_main.c does
t3_get_fw_version(adapter, &fw_vers);
t3_get_tp_version(adapter, &tp_vers);
and from reading further in the code it's not obvious that this is safe
to do without serialization (it calls into t3_read_flash(), which does a
typical "write address reg, read data reg" sequence to access flash,
without any locking).
- R.
next prev parent reply other threads:[~2008-07-07 22:45 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-06 20:08 Printing the driver name as part of the netdev watchdog message Arjan van de Ven
2008-07-06 22:53 ` David Miller
2008-07-06 23:56 ` Arjan van de Ven
2008-07-07 1:51 ` Wang Chen
2008-07-07 3:59 ` David Miller
2008-07-07 4:34 ` Arjan van de Ven
2008-07-07 4:49 ` David Miller
2008-07-07 4:57 ` Arjan van de Ven
2008-07-07 6:44 ` David Miller
2008-07-07 15:23 ` Arjan van de Ven
2008-07-07 1:08 ` Stephen Hemminger
2008-07-07 1:22 ` David Miller
2008-07-07 1:53 ` Jeff Garzik
2008-07-07 17:05 ` Stephen Hemminger
2008-07-07 22:45 ` Roland Dreier [this message]
2008-07-07 22:57 ` David Miller
2008-07-07 23:14 ` Roland Dreier
2008-07-07 23:44 ` Stephen Hemminger
2008-07-08 0:10 ` Arjan van de Ven
2008-07-08 19:13 ` Steve Wise
2008-07-08 21:31 ` David Miller
2008-07-08 21:47 ` Arjan van de Ven
2008-07-08 21:57 ` David Miller
2008-07-08 23:48 ` Arjan van de Ven
2008-07-08 23:53 ` David Miller
2008-07-09 0:17 ` Arjan van de Ven
2008-07-09 1:44 ` Arjan van de Ven
2008-07-09 3:16 ` Stephen Hemminger
2008-07-09 17:20 ` Joe Perches
2008-07-09 17:56 ` Arjan van de Ven
2008-07-09 18:20 ` Joe Perches
2008-07-09 18:50 ` Arjan van de Ven
2008-07-09 18:28 ` Ben Hutchings
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=adafxqlxqi5.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=arjan@infradead.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).