From: Flavio Leitner <fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Pravin Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Cc: openvswitch <dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org>,
netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning
Date: Thu, 27 Mar 2014 14:33:44 -0300 [thread overview]
Message-ID: <20140327173344.GK18707@t520.home> (raw)
In-Reply-To: <CALnjE+q41G9KKf_EhTdDvZtX_Xao_WG+KhRZ2fKe0JF8sqjZxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, Mar 27, 2014 at 10:19:23AM -0700, Pravin Shelar wrote:
> On Thu, Mar 27, 2014 at 7:05 AM, Flavio Leitner <fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> > There are two problematic situations.
> >
> > A deadlock can happen when is_percpu is false because it can get
> > interrupted while holding the spinlock. Then it executes
> > ovs_flow_stats_update() in softirq context which tries to get
> > the same lock.
> >
> > The second sitation is that when is_percpu is true, the code
> > correctly disables BH but only for the local CPU, so the
> > following can happen when locking the remote CPU without
> > disabling BH:
> >
> > CPU#0 CPU#1
> > ovs_flow_stats_get()
> > stats_read()
> > +->spin_lock remote CPU#1 ovs_flow_stats_get()
> > | <interrupted> stats_read()
> > | ... +--> spin_lock remote CPU#0
> > | | <interrupted>
> > | ovs_flow_stats_update() | ...
> > | spin_lock local CPU#0 <--+ ovs_flow_stats_update()
> > +---------------------------------- spin_lock local CPU#1
> >
> > This patch disables BH for both cases fixing the deadlocks.
>
> This bug is already fixed in OVS.
Could you point me to the commit? I am not finding anything
recent.
next prev parent reply other threads:[~2014-03-27 17:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 14:05 [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning Flavio Leitner
2014-03-27 17:19 ` Pravin Shelar
[not found] ` <CALnjE+q41G9KKf_EhTdDvZtX_Xao_WG+KhRZ2fKe0JF8sqjZxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-27 17:33 ` Flavio Leitner [this message]
[not found] ` <20140327173344.GK18707-xXVkluYekySzQB+pC5nmwQ@public.gmane.org>
2014-03-27 17:37 ` Jesse Gross
[not found] ` <CAEP_g=--TMq8s4JdSTcybXgGM6o8mqrWh1NWGFt2Jy4QQuXjmA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-27 17:44 ` Flavio Leitner
2014-03-27 18:32 ` [ovs-dev] " Jesse Gross
[not found] ` <CAEP_g=_Mih_UxHfe4tbgG_iBcep-aeVdDi=nNfXtbGEm41XaXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-27 18:40 ` Pravin Shelar
[not found] ` <CALnjE+rdBo=hB128cpD_0sZkLEoaVCh3a8Z1HZb28-3hkJ3kEA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-27 20:01 ` Jesse Gross
2014-03-27 21:18 ` [ovs-dev] " Pravin Shelar
2014-03-27 21:51 ` Jesse Gross
[not found] ` <1395929134-4487-1-git-send-email-fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-03-28 20:42 ` David Miller
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=20140327173344.GK18707@t520.home \
--to=fbl-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pshelar-l0M0P4e3n4LQT0dZR+AlfA@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).