]> bbs.cooldavid.org Git - net-next-2.6.git/commit
um: Proper Fix for f25c80a4: remove duplicate structure field initialization
authorBoaz Harrosh <bharrosh@panasas.com>
Wed, 29 Sep 2010 08:34:27 +0000 (08:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Sep 2010 02:30:11 +0000 (19:30 -0700)
commit9337057d4335053dc14934a60d9c3e8fe4e32039
treec530d94ff1517586dd93f409aee882858f9925a3
parent68c1f3a96c32a4fe15ebadae45c8145a5e5a66d2
um: Proper Fix for f25c80a4: remove duplicate structure field initialization

uml_net_set_mac() was broken and luckily it was never used, before.
What it was trying to do is spin_lock before memcopy the mac address.
Linus attempted to fix it in assumption that someone decided the
lock was needed. But since it was never ever used at all, and was
just dead code, I think we can assume that it is not needed, after
all.

On the other hand patch [f25c80a4] was trying to use eth_mac_addr()
in eth_configure(), *which was the real fallout*. Because of state
checks done inside eth_mac_addr() the address was never set. I have
not reintroduced the memcpy wrapper, but I've put a comment for future
cats.

The code now is back to exactly as it was before [f25c80a4]. With
the cleanup applied. If the spin_lock is indeed needed then a contender
should supply a test case that fails, then fix it with the proper
locking, as a separate unrelated patch.

CC: Julia Lawall <julia@diku.dk>
CC: David S. Miller <davem@davemloft.net>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Al Viro <viro@ZenIV.linux.org.uk>
Tested-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/um/drivers/net_kern.c