]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
tipc: make media_ptr pointed netdevice valid
authorYing Xue <ying.xue@windriver.com>
Mon, 21 Apr 2014 02:55:49 +0000 (10:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Apr 2014 01:17:53 +0000 (21:17 -0400)
commitf1c8d8cb82113ea6f41d2774127d3d08a4ca8d46
tree2d693909807175458e181073041ec2d63cdb3fa0
parent7216cd949c9bd56a4ccd952c624ab68f8c9aa0a4
tipc: make media_ptr pointed netdevice valid

The 'media_ptr' pointer in bearer structure which points to network
device, is protected by RCU. So, before netdevice is released,
synchronize_net() should be involved to prevent no any user of
the netdevice on read side from accessing it after it is freed.

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>
net/tipc/bearer.c