From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
To: "Johan Knöös" <jknoos@google.com>
Cc: Joel Fernandes <joel@joelfernandes.org>,
Gregory Rose <gvrose8192@gmail.com>,
"Uladzislau Rezki (Sony)" <urezki@gmail.com>,
"Paul E . McKenney" <paulmck@kernel.org>,
ovs dev <dev@openvswitch.org>, Netdev <netdev@vger.kernel.org>,
rcu <rcu@vger.kernel.org>, David Miller <davem@davemloft.net>
Subject: Re: [PATCH v2] net: openvswitch: introduce common code for flushing flows
Date: Sat, 15 Aug 2020 15:39:27 +0800 [thread overview]
Message-ID: <CAMDZJNV4uMn-6KYNHMmDGMHtDHw4zVyxxYyr47gArW-jBmxPSw@mail.gmail.com> (raw)
In-Reply-To: <CA+Sh73OVgGEVyhqenXm7HpT4fQfLeZVc+SHWO90iiW2QXkcEQg@mail.gmail.com>
On Sat, Aug 15, 2020 at 3:28 AM Johan Knöös <jknoos@google.com> wrote:
>
> On Thu, Aug 13, 2020 at 3:53 PM David Miller <davem@davemloft.net> wrote:
> >
> > From: xiangxia.m.yue@gmail.com
> > Date: Wed, 12 Aug 2020 17:56:39 +0800
> >
> > > From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> > >
> > > To avoid some issues, for example RCU usage warning and double free,
> > > we should flush the flows under ovs_lock. This patch refactors
> > > table_instance_destroy and introduces table_instance_flow_flush
> > > which can be invoked by __dp_destroy or ovs_flow_tbl_flush.
> > >
> > > Fixes: 50b0e61b32ee ("net: openvswitch: fix possible memleak on destroy flow-table")
> > > Reported-by: Johan Knöös <jknoos@google.com>
> > > Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2020-August/050489.html
> > > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> >
> > Applied, thank you.
>
> Tonghao, does the following change to your commit make sense to be
> able to apply it on 5.6.14 (e3ac9117b18596b7363d5b7904ab03a7d782b40c)?
Not applied cleanly, if necessary I can send v3 for 5.6.14.
> @@ -393,7 +387,7 @@ void ovs_flow_tbl_destroy(struct flow_table *table)
>
> free_percpu(table->mask_cache);
> kfree_rcu(rcu_dereference_raw(table->mask_array), rcu);
> - table_instance_destroy(table, ti, ufid_ti, false);
> + table_instance_destroy(ti, ufid_ti);
> }
--
Best regards, Tonghao
next prev parent reply other threads:[~2020-08-15 22:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 9:56 [PATCH v2] net: openvswitch: introduce common code for flushing flows xiangxia.m.yue
2020-08-13 19:04 ` Cong Wang
2020-08-13 22:53 ` David Miller
2020-08-14 19:27 ` Johan Knöös
2020-08-15 7:39 ` Tonghao Zhang [this message]
2020-08-17 20:13 ` Johan Knöös
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=CAMDZJNV4uMn-6KYNHMmDGMHtDHw4zVyxxYyr47gArW-jBmxPSw@mail.gmail.com \
--to=xiangxia.m.yue@gmail.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=gvrose8192@gmail.com \
--cc=jknoos@google.com \
--cc=joel@joelfernandes.org \
--cc=netdev@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=urezki@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).