diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-08-03 06:49:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-15 15:04:30 -0400 |
commit | 931d5990ed8186a1dc627b34c7d3b28dd89011d7 (patch) | |
tree | ddf0cbb69223253cb07c8b96b984d52090754447 /drivers | |
parent | ab7029e676b83e54e639101e5ba96a07d7968cd5 (diff) |
rt61pci: fix NULL pointer dereference in config_lna_gain
commit deee0214def5d8a32b8112f11d9c2b1696e9c0cb upstream.
We can not pass NULL libconf->conf->channel to rt61pci_config() as it
is dereferenced unconditionally in rt61pci_config_lna_gain() subroutine.
Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=44361
Reported-and-tested-by: <dolohow@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 9d35ec16a3a..9e5fd45cf49 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2254,8 +2254,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev) | |||
2254 | 2254 | ||
2255 | static void rt61pci_wakeup(struct rt2x00_dev *rt2x00dev) | 2255 | static void rt61pci_wakeup(struct rt2x00_dev *rt2x00dev) |
2256 | { | 2256 | { |
2257 | struct ieee80211_conf conf = { .flags = 0 }; | 2257 | struct rt2x00lib_conf libconf = { .conf = &rt2x00dev->hw->conf }; |
2258 | struct rt2x00lib_conf libconf = { .conf = &conf }; | ||
2259 | 2258 | ||
2260 | rt61pci_config(rt2x00dev, &libconf, IEEE80211_CONF_CHANGE_PS); | 2259 | rt61pci_config(rt2x00dev, &libconf, IEEE80211_CONF_CHANGE_PS); |
2261 | } | 2260 | } |