From: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
To: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>,
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dev-yBygre7rU0SM8Zsap4Y0gw@public.gmane.org
Subject: Re: [PATCH net 4/5] openvswitch: Fix ovs_flow_free() ovs-lock assert.
Date: Mon, 03 Feb 2014 20:42:06 +0400 [thread overview]
Message-ID: <52EFC6DE.3070603@cogentembedded.com> (raw)
In-Reply-To: <1391389686-34303-5-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Hello.
On 03-02-2014 5:08, Jesse Gross wrote:
> From: Pravin B Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
> ovs_flow_free() is not called under ovs-lock during packet
> execute path (ovs_packet_cmd_execute()). Since packet execute
> does not touch flow->mask, there is no need to take that
> lock either. So move assert in case where flow->mask is checked.
> Found by code inspection.
> Signed-off-by: Pravin B Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
> ---
> net/openvswitch/flow_table.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
> index bd14052..ad0bda0 100644
> --- a/net/openvswitch/flow_table.c
> +++ b/net/openvswitch/flow_table.c
> @@ -158,11 +158,12 @@ void ovs_flow_free(struct sw_flow *flow, bool deferred)
> if (!flow)
> return;
>
> - ASSERT_OVSL();
> -
> if (flow->mask) {
> struct sw_flow_mask *mask = flow->mask;
>
> + /* ovs-lock is required to protect mask-refcount and
> + * mask list. */
Networking multi-line comment style is:
/* bla
* bla
*/
WBR, Sergei
next prev parent reply other threads:[~2014-02-03 16:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 1:08 [GIT net] Open vSwitch Jesse Gross
[not found] ` <1391389686-34303-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-02-03 1:08 ` [PATCH net 1/5] openvswitch: Pad OVS_PACKET_ATTR_PACKET if linear copy was performed Jesse Gross
[not found] ` <1391389686-34303-2-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-02-03 16:43 ` Sergei Shtylyov
[not found] ` <52EFC74E.8040906-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-02-05 6:02 ` Jesse Gross
2014-02-03 1:08 ` [PATCH net 2/5] openvswitch: Fix kernel panic on ovs_flow_free Jesse Gross
2014-02-03 1:08 ` [PATCH net 3/5] openvswitch: Fix ovs_dp_cmd_msg_size() Jesse Gross
2014-02-03 1:08 ` [PATCH net 4/5] openvswitch: Fix ovs_flow_free() ovs-lock assert Jesse Gross
[not found] ` <1391389686-34303-5-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-02-03 16:42 ` Sergei Shtylyov [this message]
2014-02-03 1:08 ` [PATCH net 5/5] openvswitch: Suppress error messages on megaflow updates Jesse Gross
[not found] ` <1391389686-34303-6-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-02-03 6:55 ` [RFC PATCH] openvswitch: Use net_ratelimit in OVS_NLERR Joe Perches
2014-02-03 21:46 ` Jesse Gross
[not found] ` <CAEP_g=_vvSPLt76VUE66XHJtgCW_05acn-r77PfkJFWBkT0S2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-03 22:08 ` Joe Perches
2014-02-03 23:41 ` Jesse Gross
[not found] ` <CAEP_g=83oVtSTMmLB7O8g=a3e5ghjHp7Bgs-f4nvgqCvWqE5VQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-04 1:06 ` [PATCH] " Joe Perches
2014-02-04 1:18 ` [PATCH] openvswitch: flow_netlink: Use pr_fmt to OVS_NLERR output Joe Perches
2014-02-04 1:29 ` Jesse Gross
2014-02-04 1:29 ` [PATCH] openvswitch: Use net_ratelimit in OVS_NLERR Jesse Gross
-- strict thread matches above, loose matches on Subject: below --
2014-02-05 6:59 [GIT net] Open vSwitch Jesse Gross
[not found] ` <1391583561-25399-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-02-05 6:59 ` [PATCH net 4/5] openvswitch: Fix ovs_flow_free() ovs-lock assert Jesse Gross
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=52EFC6DE.3070603@cogentembedded.com \
--to=sergei.shtylyov-m4dtvfq/zs1mrggop+s0pdbpr1lh4cv8@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=dev-yBygre7rU0SM8Zsap4Y0gw@public.gmane.org \
--cc=jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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).