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  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:   Tue, 8 Sep 2020 08:58:07 -0600
From:   David Ahern <dsahern@...il.com>
To:     Ido Schimmel <idosch@...sch.org>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, roopa@...dia.com,
        mlxsw@...dia.com, Ido Schimmel <idosch@...dia.com>
Subject: Re: [RFC PATCH net-next 08/22] nexthop: vxlan: Convert to new
 notification info

On 9/8/20 3:10 AM, Ido Schimmel wrote:
> From: Ido Schimmel <idosch@...dia.com>
> 
> Convert the sole listener of the nexthop notification chain (the VXLAN
> driver) to the new notification info.
> 
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> ---
>  drivers/net/vxlan.c | 9 +++++++--
>  net/ipv4/nexthop.c  | 2 +-
>  2 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index b9fefe27e3e8..29deedee6ef4 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -4687,9 +4687,14 @@ static void vxlan_fdb_nh_flush(struct nexthop *nh)
>  static int vxlan_nexthop_event(struct notifier_block *nb,
>  			       unsigned long event, void *ptr)
>  {
> -	struct nexthop *nh = ptr;
> +	struct nh_notifier_info *info = ptr;
> +	struct nexthop *nh;
> +
> +	if (event != NEXTHOP_EVENT_DEL)
> +		return NOTIFY_DONE;
>  
> -	if (!nh || event != NEXTHOP_EVENT_DEL)
> +	nh = nexthop_find_by_id(info->net, info->id);

hmmm.... why add the id to the info versus a nh pointer if a lookup is
needed?

> +	if (!nh)
>  		return NOTIFY_DONE;
>  
>  	vxlan_fdb_nh_flush(nh);

Powered by blists - more mailing lists