Re: [ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-28 Thread David Miller
From: Flavio Leitner Date: Thu, 27 Mar 2014 11:05:34 -0300 > 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

Re: [ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-27 Thread Jesse Gross
On Thu, Mar 27, 2014 at 7:05 AM, Flavio Leitner 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

Re: [ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-27 Thread Pravin Shelar
On Thu, Mar 27, 2014 at 1:01 PM, Jesse Gross wrote: > On Thu, Mar 27, 2014 at 11:40 AM, Pravin Shelar wrote: >> On Thu, Mar 27, 2014 at 11:32 AM, Jesse Gross wrote: >>> On Thu, Mar 27, 2014 at 10:44 AM, Flavio Leitner wrote: On Thu, Mar 27, 2014 at 10:37:32AM -0700, Jesse Gross wrote:

Re: [ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-27 Thread Jesse Gross
On Thu, Mar 27, 2014 at 11:40 AM, Pravin Shelar wrote: > On Thu, Mar 27, 2014 at 11:32 AM, Jesse Gross wrote: >> On Thu, Mar 27, 2014 at 10:44 AM, Flavio Leitner wrote: >>> On Thu, Mar 27, 2014 at 10:37:32AM -0700, Jesse Gross wrote: On Thu, Mar 27, 2014 at 10:33 AM, Flavio Leitner wrote:

Re: [ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-27 Thread Pravin Shelar
On Thu, Mar 27, 2014 at 11:32 AM, Jesse Gross wrote: > On Thu, Mar 27, 2014 at 10:44 AM, Flavio Leitner wrote: >> On Thu, Mar 27, 2014 at 10:37:32AM -0700, Jesse Gross wrote: >>> On Thu, Mar 27, 2014 at 10:33 AM, Flavio Leitner wrote: >>> > On Thu, Mar 27, 2014 at 10:19:23AM -0700, Pravin Shelar

Re: [ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-27 Thread Jesse Gross
On Thu, Mar 27, 2014 at 10:44 AM, Flavio Leitner wrote: > On Thu, Mar 27, 2014 at 10:37:32AM -0700, Jesse Gross wrote: >> On Thu, Mar 27, 2014 at 10:33 AM, Flavio Leitner wrote: >> > On Thu, Mar 27, 2014 at 10:19:23AM -0700, Pravin Shelar wrote: >> >> On Thu, Mar 27, 2014 at 7:05 AM, Flavio Leitn

Re: [ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-27 Thread Flavio Leitner
On Thu, Mar 27, 2014 at 10:37:32AM -0700, Jesse Gross wrote: > On Thu, Mar 27, 2014 at 10:33 AM, Flavio Leitner wrote: > > On Thu, Mar 27, 2014 at 10:19:23AM -0700, Pravin Shelar wrote: > >> On Thu, Mar 27, 2014 at 7:05 AM, Flavio Leitner wrote: > >> > There are two problematic situations. > >> >

Re: [ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-27 Thread Jesse Gross
On Thu, Mar 27, 2014 at 10:33 AM, Flavio Leitner wrote: > On Thu, Mar 27, 2014 at 10:19:23AM -0700, Pravin Shelar wrote: >> On Thu, Mar 27, 2014 at 7:05 AM, Flavio Leitner wrote: >> > There are two problematic situations. >> > >> > A deadlock can happen when is_percpu is false because it can get

Re: [ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-27 Thread Flavio Leitner
On Thu, Mar 27, 2014 at 10:19:23AM -0700, Pravin Shelar wrote: > On Thu, Mar 27, 2014 at 7:05 AM, Flavio Leitner 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 >

Re: [ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-27 Thread Pravin Shelar
On Thu, Mar 27, 2014 at 7:05 AM, Flavio Leitner 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

[ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-27 Thread Flavio Leitner
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