* [PATCH]X86:PCI: Fix an uninitialized variable warning
@ 2011-04-04 9:12 wanlong.gao
2011-04-12 16:13 ` Jesse Barnes
0 siblings, 1 reply; 3+ messages in thread
From: wanlong.gao @ 2011-04-04 9:12 UTC (permalink / raw)
To: jbarnes, prarit, kaneshige.kenji, seto.hidetoshi, arnd
Cc: linux-pci, linux-kernel, harryxiyou, Wanlong Gao
From: Wanlong Gao <wanlong.gao@gmail.com>
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>
---
drivers/pci/pcie/aer/aer_inject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/pcie/aer/aer_inject.c b/drivers/pci/pcie/aer/aer_inject.c
index f62079f..95489cd
--- 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);
--
1.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH]X86:PCI: Fix an uninitialized variable warning
2011-04-04 9:12 [PATCH]X86:PCI: Fix an uninitialized variable warning wanlong.gao
@ 2011-04-12 16:13 ` Jesse Barnes
2011-04-13 2:37 ` wanlong gao
0 siblings, 1 reply; 3+ messages in thread
From: Jesse Barnes @ 2011-04-12 16:13 UTC (permalink / raw)
To: wanlong.gao
Cc: prarit, kaneshige.kenji, seto.hidetoshi, arnd, linux-pci,
linux-kernel, harryxiyou
On Mon, 4 Apr 2011 17:12:59 +0800
wanlong.gao@gmail.com wrote:
> From: Wanlong Gao <wanlong.gao@gmail.com>
>
> 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 .
Applied to my linux-next branch, thanks.
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]X86:PCI: Fix an uninitialized variable warning
2011-04-12 16:13 ` Jesse Barnes
@ 2011-04-13 2:37 ` wanlong gao
0 siblings, 0 replies; 3+ messages in thread
From: wanlong gao @ 2011-04-13 2:37 UTC (permalink / raw)
To: Jesse Barnes
Cc: prarit, kaneshige.kenji, seto.hidetoshi, arnd, linux-pci,
linux-kernel, harryxiyou
On 4/13/11, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Mon, 4 Apr 2011 17:12:59 +0800
> wanlong.gao@gmail.com wrote:
>
>> From: Wanlong Gao <wanlong.gao@gmail.com>
>>
>> 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 .
>
> Applied to my linux-next branch, thanks.
Thank you for your hard work to the open-source .
Best regards .
>
> --
> Jesse Barnes, Intel Open Source Technology Center
>
--
Best regards
Wanlong Gao
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-13 2:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04 9:12 [PATCH]X86:PCI: Fix an uninitialized variable warning wanlong.gao
2011-04-12 16:13 ` Jesse Barnes
2011-04-13 2:37 ` wanlong gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).