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, 16 Aug 2019 12:58:01 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Vlad Buslov <vladbu@...lanox.com>
Cc:     netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
        jiri@...nulli.us, davem@...emloft.net, wenxu@...oud.cn,
        pablo@...filter.org
Subject: Re: [PATCH net-next] net: flow_offload: convert block_ing_cb_list
 to regular list type

On Fri, 16 Aug 2019 18:06:54 +0300, Vlad Buslov wrote:
> diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
> index 64c3d4d72b9c..cf52d9c422fa 100644
> --- a/net/core/flow_offload.c
> +++ b/net/core/flow_offload.c
> @@ -391,6 +391,8 @@ static void flow_indr_block_cb_del(struct flow_indr_block_cb *indr_block_cb)
>  	kfree(indr_block_cb);
>  }
>  
> +static DEFINE_MUTEX(flow_indr_block_ing_cb_lock);

I'd be tempted to place this definition next to:

static LIST_HEAD(block_ing_cb_list);

as it seems this is the list it protects. The reason for the name
discrepancy between the two is not immediately obvious to me :S 
but you're not changing that.

Otherwise makes sense, so FWIW:

Acked-by: Jakub Kicinski <jakub.kicinski@...ronome.com>

>  static void flow_block_ing_cmd(struct net_device *dev,
>  			       flow_indr_block_bind_cb_t *cb,
>  			       void *cb_priv,
> @@ -398,11 +400,11 @@ static void flow_block_ing_cmd(struct net_device *dev,
>  {
>  	struct flow_indr_block_ing_entry *entry;
>  
> -	rcu_read_lock();
> -	list_for_each_entry_rcu(entry, &block_ing_cb_list, list) {
> +	mutex_lock(&flow_indr_block_ing_cb_lock);
> +	list_for_each_entry(entry, &block_ing_cb_list, list) {
>  		entry->cb(dev, cb, cb_priv, command);
>  	}
> -	rcu_read_unlock();
> +	mutex_unlock(&flow_indr_block_ing_cb_lock);
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ