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:   Fri, 25 Nov 2016 10:48:58 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     fgao@...vckh6395k16k5.yundunddos.com, davem@...emloft.net,
        edumazet@...gle.com, netdev@...r.kernel.org, gfree.wind@...il.com
Subject: Re: [PATCH net 1/1] driver: macvtap: Unregister netdev rx_handler if
 macvtap_newlink fails



On 2016年11月25日 10:05, fgao@...vckh6395k16k5.yundunddos.com wrote:
> From: Gao Feng <fgao@...ai8.com>
>
> The macvtap_newlink registers the netdev rx_handler firstly, but it
> does not unregister the handler if macvlan_common_newlink failed.
>
> Signed-off-by: Gao Feng <fgao@...ai8.com>
> ---
>   drivers/net/macvtap.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
> index 070e329..bceca28 100644
> --- a/drivers/net/macvtap.c
> +++ b/drivers/net/macvtap.c
> @@ -491,7 +491,13 @@ static int macvtap_newlink(struct net *src_net,
>   	/* Don't put anything that may fail after macvlan_common_newlink
>   	 * because we can't undo what it does.
>   	 */
> -	return macvlan_common_newlink(src_net, dev, tb, data);
> +	err = macvlan_common_newlink(src_net, dev, tb, data);
> +	if (err) {
> +		netdev_rx_handler_unregister(dev);
> +		return err;
> +	}
> +
> +	return 0;
>   }
>   
>   static void macvtap_dellink(struct net_device *dev,

Acked-by: Jason Wang <jasowang@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ