Bug 1088570 - [F19] backport upstream commit openvswitch: fix a possible deadlock and lockdep warning
Summary: [F19] backport upstream commit openvswitch: fix a possible deadlock and lockd...
Keywords:
Status: CLOSED DUPLICATE of bug 1088569
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 19
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1080680
TreeView+ depends on / blocked
 
Reported: 2014-04-16 19:11 UTC by Flavio Leitner
Modified: 2014-04-16 19:15 UTC (History)
6 users (show)

Fixed In Version:
Clone Of: 1088569
Environment:
Last Closed: 2014-04-16 19:15:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Flavio Leitner 2014-04-16 19:11:56 UTC
Description of problem:

This fix is needed to run openvswitch 2.1.0 on Fedora 19.

commit 4f647e0a3c37b8d5086214128614a136064110c3
Author: Flavio Leitner <fbl>
Date:   Thu Mar 27 11:05:34 2014 -0300

    openvswitch: fix a possible deadlock and lockdep warning
    
    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.
    Acked-by: Jesse Gross <jesse>
[...]   
    Signed-off-by: Flavio Leitner <fbl>
    Signed-off-by: David S. Miller <davem>

--- Additional comment from Josh Boyer on 2014-04-16 15:10:36 EDT ---

Comment 1 Josh Boyer 2014-04-16 19:15:55 UTC
We only need one bug to track this.  F19 and F20 are on the same kernel version.

*** This bug has been marked as a duplicate of bug 1088569 ***


Note You need to log in before you can comment on or make changes to this bug.