From: Wanlong Gao Date: Mon, 4 Apr 2011 09:12:59 +0000 (+0800) Subject: PCI: Fix uninitialized variable bug in AER injection code X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=40294d8f14384780a61a2dea8c92a231176ae301;p=openwrt%2Fstaging%2Fblogic.git PCI: Fix uninitialized variable bug in AER injection code If it was preempted, and the variable aer_mask_override is changed after the spin_unlock_irqrestore it will write an uninitialized variable by the pci_write_config_dword() function. Signed-off-by: Wanlong Gao Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/pcie/aer/aer_inject.c b/drivers/pci/pcie/aer/aer_inject.c index f62079ff06dd..95489cd9a555 100644 --- a/drivers/pci/pcie/aer/aer_inject.c +++ b/drivers/pci/pcie/aer/aer_inject.c @@ -326,7 +326,7 @@ static int aer_inject(struct aer_error_inj *einj) unsigned long flags; unsigned int devfn = PCI_DEVFN(einj->dev, einj->fn); int pos_cap_err, rp_pos_cap_err; - u32 sever, cor_mask, uncor_mask, cor_mask_orig, uncor_mask_orig; + u32 sever, cor_mask, uncor_mask, cor_mask_orig = 0, uncor_mask_orig = 0; int ret = 0; dev = pci_get_domain_bus_and_slot((int)einj->domain, einj->bus, devfn);