]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
tipc: Check for disabled bearer when processing incoming messages
authorAllan Stephens <allan.stephens@windriver.com>
Tue, 17 Aug 2010 11:00:07 +0000 (11:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Aug 2010 00:31:53 +0000 (17:31 -0700)
commitb02b69c8a403859ec72090742727e853d606a325
tree6c46c41cc46fde8ea8a45d6265a3381556e0f84e
parentf662c07058f7e6365ae65080d772f9122f6f50a9
tipc: Check for disabled bearer when processing incoming messages

Add a check to tipc_recv_msg() to ensure it discards messages
arriving on a newly disabled bearer.  This is needed to deal with a
race condition that can arise if the bearer is in the midst of being
disabled when it receives a message.  Performing the check after
tipc_net_lock has been taken ensures that TIPC's bearers are in a
stable state while the message is being processed.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c