diff options
| author | Ying Xue <[email protected]> | 2013-12-27 02:18:28 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2013-12-30 03:24:07 +0000 |
| commit | 84602761ca4495dd409be936dfa93ed20c946684 (patch) | |
| tree | 5936e501cc24cc66cf298a8e6713cbb04b4427b0 /drivers/net/xen-netback/interface.c | |
| parent | Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge (diff) | |
| download | kernel-84602761ca4495dd409be936dfa93ed20c946684.tar.gz kernel-84602761ca4495dd409be936dfa93ed20c946684.zip | |
tipc: fix deadlock during socket release
A deadlock might occur if name table is withdrawn in socket release
routine, and while packets are still being received from bearer.
CPU0 CPU1
T0: recv_msg() release()
T1: tipc_recv_msg() tipc_withdraw()
T2: [grab node lock] [grab port lock]
T3: tipc_link_wakeup_ports() tipc_nametbl_withdraw()
T4: [grab port lock]* named_cluster_distribute()
T5: wakeupdispatch() tipc_link_send()
T6: [grab node lock]*
The opposite order of holding port lock and node lock on above two
different paths may result in a deadlock. If socket lock instead of
port lock is used to protect port instance in tipc_withdraw(), the
reverse order of holding port lock and node lock will be eliminated,
as a result, the deadlock is killed as well.
Reported-by: Lars Everbrand <[email protected]>
Reviewed-by: Erik Hugne <[email protected]>
Signed-off-by: Ying Xue <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions
