[lkml]   [2010]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[036/289] ath9k: add locking for starting the PCU on RX
2.6.36-stable review patch.  If anyone has any objections, please let us know.


From: Luis R. Rodriguez <>

commit 7583c550c3e635dcc61ab127c36ecefd59fb8dc8 upstream.

There was some locking for starting some parts of
RX but not for starting the PCU. Include this otherwise
we can content against stopping the PCU.

This can potentially lead to races against different
buffers on the PCU which can lead to to the DMA RX
engine writing to buffers which are already freed.

This is part of a series that will help resolve the bug:

For more details about this issue refer to:

Cc: Ben Greear <>
Cc: Kyungwan Nam <>
Signed-off-by: Luis R. Rodriguez <>
Tested-by: Ben Greear <>
Signed-off-by: John W. Linville <>
Signed-off-by: Greg Kroah-Hartman <>

index e581b1f..b3c9baf 100644
drivers/net/wireless/ath/ath9k/recv.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -288,11 +288,11 @@ static void ath_edma_start_recv(struct a
ath_rx_addbuffer_edma(sc, ATH9K_RX_QUEUE_LP,

- spin_unlock_bh(&sc->rx.rxbuflock);

ath9k_hw_startpcureceive(sc->sc_ah, (sc->sc_flags & SC_OP_OFFCHANNEL));
+ spin_unlock_bh(&sc->rx.rxbuflock);

static void ath_edma_stop_recv(struct ath_softc *sc)
@@ -494,10 +494,11 @@ int ath_startrecv(struct ath_softc *sc)

- spin_unlock_bh(&sc->rx.rxbuflock);
ath9k_hw_startpcureceive(ah, (sc->sc_flags & SC_OP_OFFCHANNEL));

+ spin_unlock_bh(&sc->rx.rxbuflock);
return 0;

 \ /
  Last update: 2010-12-08 02:59    [W:0.504 / U:1.188 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site