]> git.baikalelectronics.ru Git - kernel.git/commit
iwlagn: verify mutex held for sync commands
authorJohannes Berg <johannes.berg@intel.com>
Mon, 27 Jun 2011 13:06:42 +0000 (06:06 -0700)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 1 Jul 2011 14:46:21 +0000 (07:46 -0700)
commitcd1e9700d744cf2d2a9fc299d5b21c3ca8e2386a
tree0e1f04eb63b342018635f0bb38860e13cedaaa7d
parente1631f25d084588d9e3e1c17f94f325cd7a42372
iwlagn: verify mutex held for sync commands

Emmanuel noticed that there's no explicit checking
that prevents the driver from attempting to issue
multiple synchronous commands at the same time and
wrote a patch to check. However, his patch warns
only if a collision actually happened, an unlikely
thing since the driver mutex should be held for
synchronous command submissions.

So instead of checking that a collision happened
add a check that the mutex is held which ensures
that collisions can't happen.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-dev.h
drivers/net/wireless/iwlwifi/iwl-hcmd.c