Commit caff42cd authored by David S. Miller's avatar David S. Miller

[NETLINK]: In netlink_trim(), verify that SKB is not on a list.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2eff7ad4
......@@ -540,6 +540,12 @@ static inline void netlink_trim(struct sk_buff *skb, int allocation)
{
int delta = skb->end - skb->tail;
/* If the packet is charged to a socket, the modification
* of truesize below is illegal and will corrupt socket
* buffer accounting state.
*/
BUG_ON(skb->list != NULL);
if (delta * 2 < skb->truesize)
return;
if (pskb_expand_head(skb, 0, -delta, allocation))
......
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