From: Herbert Xu Date: Thu, 4 Jan 2018 11:25:07 +0000 (+1100) Subject: xfrm: Use __skb_queue_tail in xfrm_trans_queue X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2d85f8d224917936ceea0552fe453fe01e2e1e0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git xfrm: Use __skb_queue_tail in xfrm_trans_queue commit d16b46e4fd8bc6063624605f25b8c0835bb1fbe3 upstream. We do not need locking in xfrm_trans_queue because it is designed to use per-CPU buffers. However, the original code incorrectly used skb_queue_tail which takes the lock. This patch switches it to __skb_queue_tail instead. Reported-and-tested-by: Artem Savkov Fixes: acf568ee859f ("xfrm: Reinject transport-mode packets...") Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert Signed-off-by: Alistair Strachan Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 3f6f6f8c9fa5..5b2409746ae0 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -518,7 +518,7 @@ int xfrm_trans_queue(struct sk_buff *skb, return -ENOBUFS; XFRM_TRANS_SKB_CB(skb)->finish = finish; - skb_queue_tail(&trans->queue, skb); + __skb_queue_tail(&trans->queue, skb); tasklet_schedule(&trans->tasklet); return 0; }