[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160229.120154.1521809488996597623.davem@davemloft.net>
Date: Mon, 29 Feb 2016 12:01:54 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: zhangshengju@...s.chinamobile.com
Cc: netdev@...r.kernel.org
Subject: Re: [net] net: fix double free issue of skbuff
From: Zhang Shengju <zhangshengju@...s.chinamobile.com>
Date: Mon, 29 Feb 2016 12:22:53 +0000
> If skb_reorder_vlan_header() failed, skb is freed and NULL is returned.
> Then at skb_vlan_untag(), it will free skbuff again which cause double
> free.
The 'skb' local variable in this case will be set to "NULL", calling
kfree_skb() on NULL doesn't do anything.
> This patch removes kfree_skb() call in function skb_reorder_vlan_header().
>
> Signed-off-by: Zhang Shengju <zhangshengju@...s.chinamobile.com>
Please analyze the complete control path of the caller of this
function, and you'll find that everything is fine.
Powered by blists - more mailing lists