diff mbox series

revert "net: kcm: fix memory leak in kcm_sendmsg"

Message ID 20210607172015.19265-1-paskripkin@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series revert "net: kcm: fix memory leak in kcm_sendmsg" | expand

Checks

Context Check Description
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Pavel Skripkin June 7, 2021, 5:20 p.m. UTC
In commit c47cc304990a ("net: kcm: fix memory leak in kcm_sendmsg")
I misunderstand the root case of memory leak and came up
completely broken fix.

So, simply revert this commit to avoid GPF.

Im so sorry about this one.

Reported-by: syzbot+65badd5e74ec62cb67dc@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
---
 net/kcm/kcmsock.c | 5 -----
 1 file changed, 5 deletions(-)
diff mbox series

Patch

diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index 1c572c8daced..6201965bd822 100644
--- a/net/kcm/kcmsock.c
+++ b/net/kcm/kcmsock.c
@@ -1066,11 +1066,6 @@  static int kcm_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
 		goto partial_message;
 	}
 
-	if (skb_has_frag_list(head)) {
-		kfree_skb_list(skb_shinfo(head)->frag_list);
-		skb_shinfo(head)->frag_list = NULL;
-	}
-
 	if (head != kcm->seq_skb)
 		kfree_skb(head);