From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] openvswitch: fix a possible deadlock and lockdep warning Date: Fri, 28 Mar 2014 16:36:39 -0400 (EDT) Message-ID: <20140328.163639.788185926435545136.davem@davemloft.net> References: <1395924836-3182-1-git-send-email-fbl@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dev-yBygre7rU0SM8Zsap4Y0gw@public.gmane.org To: fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Return-path: In-Reply-To: <1395924836-3182-1-git-send-email-fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-yBygre7rU0TnMu66kgdUjQ@public.gmane.org Sender: "dev" List-Id: netdev.vger.kernel.org From: Flavio Leitner Date: Thu, 27 Mar 2014 09:53:56 -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 same lock. > > The second sitation is that when is_percpu is true, the code > correctly disables BH only for the local CPU, but that confuses > lockdep enough to trigger the warning below. > > This patch disables BH for both cases fixing the real deadlock > and the lockdep warning message. ... > Signed-off-by: Flavio Leitner I'll let Jesse review and pick this up.