lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 18 Jan 2018 09:25:37 -0800
From:   Shannon Nelson <shannon.nelson@...cle.com>
To:     Aviad Yehezkel <aviadye@...lanox.com>,
        steffen.klassert@...unet.com, davem@...emloft.net,
        herbert@...dor.apana.org.au, netdev@...r.kernel.org
Cc:     Boris Pismeny <borisp@...lanox.com>
Subject: Re: [PATCH xfrm v1] xfrm: fix error flow in case of add state fails

On 1/18/2018 5:41 AM, Aviad Yehezkel wrote:
> If add state fails in case of device offload, netdev refcount
> will be negative since gc task is attempting to dev_free this state.
> This is fixed by putting NULL in state dev field.
> 
> Signed-off-by: Aviad Yehezkel <aviadye@...lanox.com>
> Signed-off-by: Boris Pismeny <borisp@...lanox.com>

Thanks - I was wondering about that a couple of days ago and hadn't 
gotten back to it.

Signed-off-by: Shannon Nelson <shannon.nelson@...cle.com>

> ---
>   net/xfrm/xfrm_device.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c
> index fb3f920..cd2b7d3 100644
> --- a/net/xfrm/xfrm_device.c
> +++ b/net/xfrm/xfrm_device.c
> @@ -109,6 +109,7 @@ int xfrm_dev_state_add(struct net *net, struct xfrm_state *x,
>   
>   	err = dev->xfrmdev_ops->xdo_dev_state_add(x);
>   	if (err) {
> +		xso->dev = NULL;
>   		dev_put(dev);
>   		return err;
>   	}
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ