[PATCH] net: qrtr: fix len of skb_put_padto in qrtr_node_enqueue
From: Wen Gong
Date: Tue Dec 31 2019 - 04:32:54 EST
From: Carl Huang <cjhuang@xxxxxxxxxxxxxx>
The len used for skb_put_padto is wrong, it need to add len of hdr.
Signed-off-by: Carl Huang <cjhuang@xxxxxxxxxxxxxx>
Signed-off-by: Wen Gong <wgong@xxxxxxxxxxxxxx>
---
net/qrtr/qrtr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c
index 88f98f27ad88..3d24d45be5f4 100644
--- a/net/qrtr/qrtr.c
+++ b/net/qrtr/qrtr.c
@@ -196,7 +196,7 @@ static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb,
hdr->size = cpu_to_le32(len);
hdr->confirm_rx = 0;
- skb_put_padto(skb, ALIGN(len, 4));
+ skb_put_padto(skb, ALIGN(len, 4) + sizeof(*hdr));
mutex_lock(&node->ep_lock);
if (node->ep)
--
2.23.0