[PATCH 2/3] tun: free skb in early errors

2017-12-01 Thread wexu
From: Wei Xu tun_recvmsg() supports accepting skb by msg_control after commit ac77cfd4258f ("tun: support receiving skb through msg_control"), the skb if presented should be freed no matter how far it can go along, otherwise it would be leaked. This patch fixes several missed cases. Signed-off-

[PATCH 2/3] tun: free skb in early errors

2017-12-01 Thread wexu
From: Wei Xu tun_recvmsg() supports accepting skb by msg_control after commit ac77cfd4258f ("tun: support receiving skb through msg_control"), the skb if presented should be freed within the function, otherwise it would be leaked. Signed-off-by: Wei Xu Reported-by: Matthew Rosato --- drivers/

Re: [PATCH 2/3] tun: free skb in early errors

2017-12-01 Thread Michael S. Tsirkin
On Fri, Dec 01, 2017 at 05:10:37AM -0500, w...@redhat.com wrote: > From: Wei Xu > > tun_recvmsg() supports accepting skb by msg_control after > commit ac77cfd4258f ("tun: support receiving skb through msg_control"), > the skb if presented should be freed no matter how far it can go > along, other

Re: [PATCH 2/3] tun: free skb in early errors

2017-12-01 Thread Michael S. Tsirkin
On Fri, Dec 01, 2017 at 03:07:44PM +0800, Jason Wang wrote: > > > On 2017年12月01日 13:54, w...@redhat.com wrote: > > From: Wei Xu > > > > tun_recvmsg() supports accepting skb by msg_control after > > commit ac77cfd4258f ("tun: support receiving skb through msg_control"), > > the skb if presented

Re: [PATCH 2/3] tun: free skb in early errors

2017-11-30 Thread Jason Wang
On 2017年12月01日 13:54, w...@redhat.com wrote: From: Wei Xu tun_recvmsg() supports accepting skb by msg_control after commit ac77cfd4258f ("tun: support receiving skb through msg_control"), the skb if presented should be freed within the function, otherwise it would be leaked. Signed-off-by: W