aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-12-20 12:25:08 -0500
committerDavid S. Miller <davem@davemloft.net>2012-12-21 16:14:01 -0500
commit30e6c9fa93cf3dbc7cc6df1d748ad25e4264545a (patch)
treee313291a178010fb892d9725cbecb326bd63fdc0 /include/linux
parentf7e75ba1772bc712af0070655ffd8b09906993b5 (diff)
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 c91f6df2db4972d3 (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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 02e0f6b156c..c599e4782d4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1576,7 +1576,7 @@ extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
1576 1576
1577extern rwlock_t dev_base_lock; /* Device list lock */ 1577extern rwlock_t dev_base_lock; /* Device list lock */
1578 1578
1579extern seqlock_t devnet_rename_seq; /* Device rename lock */ 1579extern seqcount_t devnet_rename_seq; /* Device rename seq */
1580 1580
1581 1581
1582#define for_each_netdev(net, d) \ 1582#define for_each_netdev(net, d) \