Commit a47c397b authored by Pavel Skripkin's avatar Pavel Skripkin Committed by David S. Miller

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

In commit c47cc304 ("net: kcm: fix memory leak in kcm_sendmsg")
I misunderstood the root case of the memory leak and came up with
completely broken fix.

So, simply revert this commit to avoid GPF reported by
syzbot.

Im so sorry for this situation.

Fixes: c47cc304 ("net: kcm: fix memory leak in kcm_sendmsg")
Reported-by: syzbot+65badd5e74ec62cb67dc@syzkaller.appspotmail.com
Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aaab3076
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment