forked from luck/tmp_suning_uos_patched
rt61pci: fix NULL pointer dereference in config_lna_gain
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 Cc: stable@vger.kernel.org Reported-and-tested-by: <dolohow@gmail.com> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
1f6fc43e62
commit
deee0214de
@ -2243,8 +2243,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev)
|
||||
|
||||
static void rt61pci_wakeup(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
struct ieee80211_conf conf = { .flags = 0 };
|
||||
struct rt2x00lib_conf libconf = { .conf = &conf };
|
||||
struct rt2x00lib_conf libconf = { .conf = &rt2x00dev->hw->conf };
|
||||
|
||||
rt61pci_config(rt2x00dev, &libconf, IEEE80211_CONF_CHANGE_PS);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user