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>
This commit is contained in:
committed by
David S. Miller
parent
7a2f7d18e7
commit
2231c5af45
@ -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];
|
||||
|
Reference in New Issue
Block a user