Google
  Web www.spinics.net

Re: Printing the driver name as part of the netdev watchdog message

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


 > > 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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Kernel List]     [Site Home]     [Ethernet Bridging]     [Git]     [IETF Annouce]     [Linux Assembly]     [VLAN]     [Networking]     [Security]     [Bugtraq]     [Rubini]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Linux Wireless]     [DDR & Rambus]     [Free Dating]     [Linux Resources]     [Wireless Reading Device]

Add to Google Powered by Linux