summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-08-05 06:42:01 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-05 06:42:01 -1000
commit07d952dc669bb70a9716a81e140e89b7d4969f09 (patch)
tree6e6455adcfdbd689e98e417401d692784de8ff92 /include
parent5fdb32472ec6cd1d62788d8872585b342b5d1d92 (diff)
parentc15fea2d8ca834dae491339c47e4fb3c81428190 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (54 commits) ipv6: check for IPv4 mapped addresses when connecting IPv6 sockets mlx4: decreasing ref count when removing mac net: Fix security_socket_sendmsg() bypass problem. net: Cap number of elements for sendmmsg net: sendmmsg should only return an error if no messages were sent ixgbe: fix PHY link setup for 82599 ixgbe: fix __ixgbe_notify_dca() bail out code igb: fix WOL on second port of i350 device e1000e: minor re-order of #include files e1000e: remove unnecessary check for NULL pointer intel drivers: repair missing flush operations macb: restore wrap bit when performing underrun cleanup cdc_ncm: fix endianness problem. irda: use PCI_VENDOR_ID_* mlx4: Fixing Ethernet unicast packet steering net: fix NULL dereferences in check_peer_redir() bnx2x: Clear MDIO access warning during first driver load bnx2x: Fix BCM578xx MAC test bnx2x: Fix BCM54618se invalid link indication bnx2x: Fix BCM84833 link ...
Diffstat (limited to 'include')
-rw-r--r--include/net/cipso_ipv4.h2
-rw-r--r--include/net/dst.h17
-rw-r--r--include/net/netlabel.h2
3 files changed, 15 insertions, 6 deletions
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h
index 3b938743514b..9808877c2ab9 100644
--- a/include/net/cipso_ipv4.h
+++ b/include/net/cipso_ipv4.h
@@ -8,7 +8,7 @@
* have chosen to adopt the protocol and over the years it has become a
* de-facto standard for labeled networking.
*
- * Author: Paul Moore <paul.moore@hp.com>
+ * Author: Paul Moore <paul@paul-moore.com>
*
*/
diff --git a/include/net/dst.h b/include/net/dst.h
index 29e255796ce1..13d507d69ddb 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -37,7 +37,7 @@ struct dst_entry {
unsigned long _metrics;
unsigned long expires;
struct dst_entry *path;
- struct neighbour *_neighbour;
+ struct neighbour __rcu *_neighbour;
#ifdef CONFIG_XFRM
struct xfrm_state *xfrm;
#else
@@ -88,12 +88,17 @@ struct dst_entry {
static inline struct neighbour *dst_get_neighbour(struct dst_entry *dst)
{
- return dst->_neighbour;
+ return rcu_dereference(dst->_neighbour);
+}
+
+static inline struct neighbour *dst_get_neighbour_raw(struct dst_entry *dst)
+{
+ return rcu_dereference_raw(dst->_neighbour);
}
static inline void dst_set_neighbour(struct dst_entry *dst, struct neighbour *neigh)
{
- dst->_neighbour = neigh;
+ rcu_assign_pointer(dst->_neighbour, neigh);
}
extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old);
@@ -382,8 +387,12 @@ static inline void dst_rcu_free(struct rcu_head *head)
static inline void dst_confirm(struct dst_entry *dst)
{
if (dst) {
- struct neighbour *n = dst_get_neighbour(dst);
+ struct neighbour *n;
+
+ rcu_read_lock();
+ n = dst_get_neighbour(dst);
neigh_confirm(n);
+ rcu_read_unlock();
}
}
diff --git a/include/net/netlabel.h b/include/net/netlabel.h
index f21a16ee3705..f67440970d7e 100644
--- a/include/net/netlabel.h
+++ b/include/net/netlabel.h
@@ -4,7 +4,7 @@
* The NetLabel system manages static and dynamic label mappings for network
* protocols such as CIPSO and RIPSO.
*
- * Author: Paul Moore <paul.moore@hp.com>
+ * Author: Paul Moore <paul@paul-moore.com>
*
*/