]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: fix async station command crash
authorJohannes Berg <johannes.berg@intel.com>
Thu, 20 Sep 2012 14:06:14 +0000 (16:06 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 20 Sep 2012 14:37:40 +0000 (16:37 +0200)
commit33b949781463863494c3ae627016100a5fb6c512
tree07c64064f1bed5480c7ddd26369d22c29a8fd915
parentd4a45cf29588bf2c718b5fc4aa35da680fdaf118
iwlwifi: fix async station command crash

Before Emmanuel's change to use a copy of the command
("iwlwifi: get the correct HCMD in the response handler")
the iwl_add_sta_callback() function would have used a
random pointer to somewhere when processing responses
to an async command, while that wasn't valid data it
was at least a valid pointer. Now, the pointer will be
NULL in this case, thus crashing.

Fix this by exiting the function early if no command
is passed back which means it was sent asynchronously.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/dvm/sta.c