OSDN Git Service

iwlwifi: pcie: prevent using unmapped memory in fw monitor
authorLiad Kaufman <liad.kaufman@intel.com>
Thu, 16 Apr 2015 14:21:12 +0000 (17:21 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Jun 2015 15:21:07 +0000 (08:21 -0700)
commit96e37b69e181bc65d36a80e687cdc8c84c749083
treedab9c3a4e961691f5425c2246cba388f7612bf1c
parentd31b01fafb8e1fa260a96113bafe9c531c152e98
iwlwifi: pcie: prevent using unmapped memory in fw monitor

commit 553452e5ffc0ed13214a287549627d02d9d7fbdc upstream.

In the case of a DMA mapping error on the last iteration of
the loop of the allocation of memory of the FW monitor we
indeed free the pages, but don't NULL out the page variable
thus allowing for the possibility of setting the FW monitor
variables with invalid data to use.

Fixes: c2d202017da1 ("iwlwifi: pcie: add firmware monitor capabilities")
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/iwlwifi/pcie/trans.c