This is a note to let you know that I've just added the patch titled

    af_packet: block BH in prb_shutdown_retire_blk_timer()

to the 3.12-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     af_packet-block-bh-in-prb_shutdown_retire_blk_timer.patch
and it can be found in the queue-3.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From foo@baz Thu Dec  5 16:16:39 PST 2013
From: Veaceslav Falico <[email protected]>
Date: Fri, 29 Nov 2013 09:53:23 +0100
Subject: af_packet: block BH in prb_shutdown_retire_blk_timer()

From: Veaceslav Falico <[email protected]>

[ Upstream commit ec6f809ff6f19fafba3212f6aff0dda71dfac8e8 ]

Currently we're using plain spin_lock() in prb_shutdown_retire_blk_timer(),
however the timer might fire right in the middle and thus try to re-aquire
the same spinlock, leaving us in a endless loop.

To fix that, use the spin_lock_bh() to block it.

Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.")
CC: "David S. Miller" <[email protected]>
CC: Daniel Borkmann <[email protected]>
CC: Willem de Bruijn <[email protected]>
CC: Phil Sutter <[email protected]>
CC: Eric Dumazet <[email protected]>
Reported-by: Jan Stancek <[email protected]>
Tested-by: Jan Stancek <[email protected]>
Signed-off-by: Veaceslav Falico <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 net/packet/af_packet.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -439,9 +439,9 @@ static void prb_shutdown_retire_blk_time
 
        pkc = tx_ring ? &po->tx_ring.prb_bdqc : &po->rx_ring.prb_bdqc;
 
-       spin_lock(&rb_queue->lock);
+       spin_lock_bh(&rb_queue->lock);
        pkc->delete_blk_timer = 1;
-       spin_unlock(&rb_queue->lock);
+       spin_unlock_bh(&rb_queue->lock);
 
        prb_del_retire_blk_timer(pkc);
 }


Patches currently in stable-queue which might be from [email protected] are

queue-3.12/af_packet-block-bh-in-prb_shutdown_retire_blk_timer.patch
queue-3.12/bonding-don-t-permit-to-use-arp-monitoring-in-802.3ad.patch
queue-3.12/bonding-fix-two-race-conditions-in.patch
queue-3.12/bonding-rcuify-bond_set_rx_mode.patch
queue-3.12/net-core-always-propagate-flag-changes-to-interfaces.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to