Skip to content

Commit d12cffe

Browse files
cpackham-atlnzdavem330
authored andcommitted
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>
1 parent 100c404 commit d12cffe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/tipc/name_distr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ void tipc_named_node_up(struct net *net, u32 dnode)
190190
struct name_table *nt = tipc_name_table(net);
191191
struct sk_buff_head head;
192192

193-
__skb_queue_head_init(&head);
193+
skb_queue_head_init(&head);
194194

195195
read_lock_bh(&nt->cluster_scope_lock);
196196
named_distribute(net, &head, dnode, &nt->cluster_scope);

0 commit comments

Comments
 (0)