Skip to content

Commit

Permalink
PCI: Fix uninitialized variable bug in AER injection code
Browse files Browse the repository at this point in the history
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 <wanlong.gao@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Wanlong Gao authored and Jesse Barnes committed May 10, 2011
1 parent 0e8ede5 commit 40294d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/pcie/aer/aer_inject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 40294d8

Please sign in to comment.