mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 08:39:52 +00:00
[PATCH] e1000: Fix invalid memory reference
Fix an invalid memory reference in the e1000 driver which would cause kernel panic. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Cc: Jeb Cramer <cramerj@intel.com> Cc: John Ronciak <john.ronciak@intel.com> Cc: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Cc: Jeff Garzik <jgarzik@pobox.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
parent
504ddff4c0
commit
32a4ec9746
@ -545,7 +545,7 @@ e1000_check_fiber_options(struct e1000_adapter *adapter)
|
||||
static void __devinit
|
||||
e1000_check_copper_options(struct e1000_adapter *adapter)
|
||||
{
|
||||
int speed, dplx;
|
||||
int speed, dplx, an;
|
||||
int bd = adapter->bd_number;
|
||||
|
||||
{ /* Speed */
|
||||
@ -641,8 +641,12 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
|
||||
.p = an_list }}
|
||||
};
|
||||
|
||||
int an = AutoNeg[bd];
|
||||
e1000_validate_option(&an, &opt, adapter);
|
||||
if (num_AutoNeg > bd) {
|
||||
an = AutoNeg[bd];
|
||||
e1000_validate_option(&an, &opt, adapter);
|
||||
} else {
|
||||
an = opt.def;
|
||||
}
|
||||
adapter->hw.autoneg_advertised = an;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user