Subject: Re: [PATCH 0/3] bonding: 3 fixes for 2.6.24

From: Jay Vosburgh <[email-masked]>
Date: Thu, 10 Jan 2008 12:45:53 -0800

Andy Gospodarek <[email-masked]> wrote:
[...]
>That wasn't the only purpose, Herbert.  Making sure that calls to
>dev_set_mac_address were called from process context was important at
>the time of the coding as well since at least the tg3 driver took locks
>that could not be taken reliably in soft-irq context.  Michael Chan
>fixed this here:
>
>commit 986e0aeb9ae09127b401c3baa66f15b7a31f354c
>Author: Michael Chan <[email-masked]>
>Date:   Sat May 5 12:10:20 2007 -0700
>
>    [TG3]: Remove reset during MAC address changes.
>
>so if wasn't as much of an issue after that, but moving as much of the
>code to process context was important for that as well (hence the move
>to not continue to try to not use bh-locks everywhere).

	Well, not for tg3 perhaps, but other network device drivers do
the same thing (if memory serves, any USB ethernet adapter will have
issues there).  Also, I believe the netlink notifier callback,
rtnetlink_event, which every dev_set_whatever calls, does a
possibly-sleeping memory allocation (rtmsg_ifinfo -> nlmsg_new ->
alloc_skb(GFP_KERNEL)); so we don't really want to hold extra locks for
that, either.

	-J

---
	-Jay Vosburgh, IBM Linux Technology Center, [email-masked]