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

Fixed In Version:
Clone Of:
: 1088570 (view as bug list)
Environment:
Last Closed: 2014-04-16 22:24:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Flavio Leitner 2014-04-16 19:05:30 UTC
Description of problem:

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

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>

Comment 1 Josh Boyer 2014-04-16 19:10:36 UTC
Could you propose this upstream for 3.13.y stable?

Comment 2 Josh Boyer 2014-04-16 19:15:55 UTC
*** Bug 1088570 has been marked as a duplicate of this bug. ***

Comment 3 Flavio Leitner 2014-04-16 19:22:08 UTC
(In reply to Josh Boyer from comment #1)
> Could you propose this upstream for 3.13.y stable?
Yes, I will request that. Thanks!

Comment 4 Flavio Leitner 2014-04-16 20:04:19 UTC
Josh, are we sticking with 3.13.y on f20 and on f19 forever?

Comment 5 Josh Boyer 2014-04-16 21:13:23 UTC
No, F20 will rebase to 3.14.y shortly.  F19 will rebase after 3.13.11 reaches F19 updates stable.

Comment 6 Flavio Leitner 2014-04-16 22:24:34 UTC
Ok, we don't have the commit introducing the issue on 3.13.y and the 3.14.y is fine.
I will close this ticket.
Thanks Josh!


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