]> git.baikalelectronics.ru Git - kernel.git/commit
mwifiex: pcie: don't allow cmd buffer reuse after reset
authorBrian Norris <briannorris@chromium.org>
Tue, 25 Jul 2017 01:13:19 +0000 (18:13 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 28 Jul 2017 14:47:46 +0000 (17:47 +0300)
commit383c34340f2417151d3f7fa5a61dc1e1852d7dcd
treebfc5a82e503246bf1967b3a979325f3a166d94c5
parentb5d59b651063a75d1aa160b01f08a2213680ca41
mwifiex: pcie: don't allow cmd buffer reuse after reset

In rogue cases (due to other bugs) it's possible we try to process an
old command response *after* resetting the device. This could trigger a
double-free (or the SKB can get reallocated elsewhere...causing other
memory corruptions) in mwifiex_pcie_process_cmd_complete().

For safety (and symmetry) let's always NULL out the command buffer as we
free it up. We're already doing this for the command response buffer.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/pcie.c