Skip to content

Commit d28ea1f

Browse files
Mani-Sadhasivamdavem330
authored andcommitted
net: qrtr: Fix passing invalid reference to qrtr_local_enqueue()
Once the traversal of the list is completed with list_for_each_entry(), the iterator (node) will point to an invalid object. So passing this to qrtr_local_enqueue() which is outside of the iterator block is erroneous eventhough the object is not used. So fix this by passing NULL to qrtr_local_enqueue(). Fixes: bdabad3 ("net: Add Qualcomm IPC router") Reported-by: kbuild test robot <[email protected]> Reported-by: Julia Lawall <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7c87e32 commit d28ea1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/qrtr/qrtr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ static int qrtr_bcast_enqueue(struct qrtr_node *node, struct sk_buff *skb,
854854
}
855855
mutex_unlock(&qrtr_node_lock);
856856

857-
qrtr_local_enqueue(node, skb, type, from, to);
857+
qrtr_local_enqueue(NULL, skb, type, from, to);
858858

859859
return 0;
860860
}

0 commit comments

Comments
 (0)