]> git.baikalelectronics.ru Git - kernel.git/commit
net: devnet_rename_seq should be a seqcount
authorEric Dumazet <edumazet@google.com>
Thu, 20 Dec 2012 17:25:08 +0000 (17:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Dec 2012 21:14:01 +0000 (13:14 -0800)
commit16d1d68b577280b818cb41e90fb8ab1561e032ed
treee313291a178010fb892d9725cbecb326bd63fdc0
parentb0d102946afa4a112eb741bdf2fbf0f1609e6a3b
net: devnet_rename_seq should be a seqcount

Using a seqlock for devnet_rename_seq is not a good idea,
as device_rename() can sleep.

As we hold RTNL, we dont need a protection for writers,
and only need a seqcount so that readers can catch a change done
by a writer.

Bug added in commit 94f1b8ab8fcc4410 (sockopt: Change getsockopt() of
SO_BINDTODEVICE to return an interface name)

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c
net/core/sock.c