summaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.h
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-04-21 10:55:47 +0800
committerDavid S. Miller <davem@davemloft.net>2014-04-22 21:17:53 -0400
commit2231c5af451e4b7ae3cc56eaa4653af6ede51109 (patch)
tree7c7e78e9adc9f746f64290530d40ce7a9b155fb7 /net/tipc/bearer.h
parent7a2f7d18e79b09c5c5a65fb1fa0e31ad046b3116 (diff)
downloadlinux-2231c5af451e4b7ae3cc56eaa4653af6ede51109.tar.bz2
tipc: use RCU to protect media_ptr pointer
Now the media_ptr pointer is protected with tipc_net_lock write lock on write side; tipc_net_lock read lock is used to read side. As the part of effort of eliminating tipc_net_lock, we decide to adjust the locking policy of media_ptr pointer protection: on write side, RTNL lock is use while on read side RCU read lock is applied. Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Tested-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.h')
-rw-r--r--net/tipc/bearer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h
index 2fa86bd67c0a..a983b3005e71 100644
--- a/net/tipc/bearer.h
+++ b/net/tipc/bearer.h
@@ -128,7 +128,7 @@ struct tipc_media {
* care of initializing all other fields.
*/
struct tipc_bearer {
- void *media_ptr; /* initalized by media */
+ void __rcu *media_ptr; /* initalized by media */
u32 mtu; /* initalized by media */
struct tipc_media_addr addr; /* initalized by media */
char name[TIPC_MAX_BEARER_NAME];