Commit d12cffe9 authored by Chris Packham's avatar Chris Packham Committed by David S. Miller

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: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Acked-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 100c4043
...@@ -190,7 +190,7 @@ void tipc_named_node_up(struct net *net, u32 dnode) ...@@ -190,7 +190,7 @@ void tipc_named_node_up(struct net *net, u32 dnode)
struct name_table *nt = tipc_name_table(net); struct name_table *nt = tipc_name_table(net);
struct sk_buff_head head; struct sk_buff_head head;
__skb_queue_head_init(&head); skb_queue_head_init(&head);
read_lock_bh(&nt->cluster_scope_lock); read_lock_bh(&nt->cluster_scope_lock);
named_distribute(net, &head, dnode, &nt->cluster_scope); named_distribute(net, &head, dnode, &nt->cluster_scope);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment