]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix work race
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 10 Sep 2008 22:01:50 +0000 (00:01 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 15 Sep 2008 20:48:20 +0000 (16:48 -0400)
commit3cc4321207e20568226c5b1e4cade87e6f996790
tree18e85326ddb298500820252f2e510b58319b52d2
parent94b2e5ab7804d1590ca0a0d89142f6cb65761296
mac80211: fix work race

When we stop an interface, the work on it may still be pending
or running. We do cancel the timer, but we do not currently
protect against the work struct. The race is very unlikely to
hit -- it'll happen only when the driver is using mac80211's
workqueue to run long-running tasks and the sta/mesh works are
delayed for quite a bit.

This patch fixes it by cancelling the work explicitly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/main.c
net/mac80211/mesh.c