]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commit
ath9k: add locking for stopping RX
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 20 Oct 2010 23:07:03 +0000 (16:07 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:32:03 +0000 (13:32 -0800)
commit7bf31d2cec2d9dfe94f1b4b11f72a13630e5e2d6
treef78f98b8fa540677458b95362bce5422d57dfc9e
parentd4accf75e672705052f80f357a241ef2897167ff
ath9k: add locking for stopping RX

commit 1e450285281bdf766272c181ecd43d4f2f0711ce upstream.

ath9k locks for starting RX but not for stopping RX. We could
potentially run into a situation where tried to stop RX
but immediately started RX. This allows for races on the
the RX engine deciding what buffer we last left off on
and could potentially cause ath9k to DMA into already
free'd memory or in the worst case at a later time to
already given memory to other drivers.

Fix this by locking stopping RX.

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

https://bugzilla.kernel.org/show_bug.cgi?id=14624

For more details about this issue refer to:

http://marc.info/?l=linux-wireless&m=128629803703756&w=2

Cc: Ben Greear <greearb@candelatech.com>
Cc: Kyungwan Nam <kyungwan.nam@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/recv.c