Netdev List
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: wenxu@ucloud.cn
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH net v2] flow_offload: fix incorrect cleanup for indirect flow_blocks
Date: Thu, 11 Jun 2020 13:05:37 +0200	[thread overview]
Message-ID: <20200611110537.GA6047@salvia> (raw)
In-Reply-To: <1591869797-7264-1-git-send-email-wenxu@ucloud.cn>

On Thu, Jun 11, 2020 at 06:03:17PM +0800, wenxu@ucloud.cn wrote:
[...]
> diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
> index 0cfc35e..40eaf64 100644
> --- a/net/core/flow_offload.c
> +++ b/net/core/flow_offload.c
> @@ -372,14 +372,13 @@ int flow_indr_dev_register(flow_indr_block_bind_cb_t *cb, void *cb_priv)
>  }
>  EXPORT_SYMBOL(flow_indr_dev_register);
>  
> -static void __flow_block_indr_cleanup(flow_setup_cb_t *setup_cb, void *cb_priv,
> +static void __flow_block_indr_cleanup(void (*release)(void *cb_priv),
>  				      struct list_head *cleanup_list)
>  {
>  	struct flow_block_cb *this, *next;
>  
>  	list_for_each_entry_safe(this, next, &flow_block_indr_list, indr.list) {
> -		if (this->cb == setup_cb &&
> -		    this->cb_priv == cb_priv) {
> +		if (this->release == release) {

Are you sure this is correct?

This will remove _all_ existing representors in this driver.

This will not work if only one representor is gone?

Please, describe what scenario you are trying to fix.

Thank you.

  reply	other threads:[~2020-06-11 11:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 10:03 [PATCH net v2] flow_offload: fix incorrect cleanup for indirect flow_blocks wenxu
2020-06-11 11:05 ` Pablo Neira Ayuso [this message]
2020-06-11 16:36   ` wenxu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200611110537.GA6047@salvia \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=wenxu@ucloud.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox