Skip to content

Commit

Permalink
rt61pci: fix NULL pointer dereference in config_lna_gain
Browse files Browse the repository at this point in the history
commit deee021 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>
  • Loading branch information
Stanislaw Gruszka authored and Greg Kroah-Hartman committed Aug 15, 2012
1 parent ab7029e commit 931d599
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/rt2x00/rt61pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2254,8 +2254,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);
}
Expand Down

0 comments on commit 931d599

Please sign in to comment.