OSDN Git Service

ath5k: manipulate rxlink and descriptor address under rxbuf lock
authorBob Copeland <me@bobcopeland.com>
Wed, 15 Apr 2009 11:57:36 +0000 (07:57 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 22 Apr 2009 20:57:15 +0000 (16:57 -0400)
commit26925042b6b105995ee54c6015e95f0caf9632d6
tree9305c7204ac3aa0bc081b67d36d6ad8a66303c0e
parentc57ca81576e7ca0369ea52c9ac5f35d0f6ca1270
ath5k: manipulate rxlink and descriptor address under rxbuf lock

Grabbing an ath5k_buf then dropping the lock is racy because the
referenced descriptor can be obtained in another thread and released
before the buffer is handed to the hardware.  Likewise, manipulating
sc->rxlink without the lock can lead to having multiple self-linked
hardware descriptors.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/base.c