Skip to content

Commit faff57a

Browse files
edumazetdavem330
authored andcommitted
net/802/mrp: fix lockdep splat
commit fb745e9 ("net/802/mrp: fix possible race condition when calling mrp_pdu_queue()") introduced a lockdep splat. [ 19.735147] ================================= [ 19.735235] [ INFO: inconsistent lock state ] [ 19.735324] 3.9.2-build-0063 #4 Not tainted [ 19.735412] --------------------------------- [ 19.735500] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. [ 19.735592] rmmod/1840 [HC0[0]:SC0[0]:HE1:SE1] takes: [ 19.735682] (&(&app->lock)->rlock#2){+.?...}, at: [<f862bb5b>] mrp_uninit_applicant+0x69/0xba [mrp] app->lock is normally taken under softirq context, so disable BH to avoid the splat. Reported-by: Denys Fedoryshchenko <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Cc: David Ward <[email protected]> Cc: Cong Wang <[email protected]> Tested-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a3659aa commit faff57a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/802/mrp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,10 +871,10 @@ void mrp_uninit_applicant(struct net_device *dev, struct mrp_application *appl)
871871
*/
872872
del_timer_sync(&app->join_timer);
873873

874-
spin_lock(&app->lock);
874+
spin_lock_bh(&app->lock);
875875
mrp_mad_event(app, MRP_EVENT_TX);
876876
mrp_pdu_queue(app);
877-
spin_unlock(&app->lock);
877+
spin_unlock_bh(&app->lock);
878878

879879
mrp_queue_xmit(app);
880880

0 commit comments

Comments
 (0)