]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: ensure head->lock is initialised
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Thu, 11 Jul 2019 22:41:15 +0000 (10:41 +1200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Jul 2019 22:34:26 +0000 (15:34 -0700)
commit2264d6084a2f23c2628a32869f5df6168ba29322
tree4632c6ec9546f0dea293ae752398fd6bf271e14a
parent0c330076c767bcd8266122806f262aeffb6b7104
tipc: ensure head->lock is initialised

tipc_named_node_up() creates a skb list. It passes the list to
tipc_node_xmit() which has some code paths that can call
skb_queue_purge() which relies on the list->lock being initialised.

The spin_lock is only needed if the messages end up on the receive path
but when the list is created in tipc_named_node_up() we don't
necessarily know if it is going to end up there.

Once all the skb list users are updated in tipc it will then be possible
to update them to use the unlocked variants of the skb list functions
and initialise the lock when we know the message will follow the receive
path.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/name_distr.c