From: wanlong.gao@gmail.com
To: jbarnes@virtuousgeek.org, prarit@redhat.com,
kaneshige.kenji@jp.fujitsu.com, seto.hidetoshi@jp.fujitsu.com,
arnd@arndb.de
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
harryxiyou@gmail.com, Wanlong Gao <wanlong.gao@gmail.com>
Subject: [PATCH]X86:PCI: Fix an uninitialized variable warning
Date: Mon, 4 Apr 2011 17:12:59 +0800 [thread overview]
Message-ID: <1301908379-19283-1-git-send-email-wanlong.gao@gmail.com> (raw)
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
next reply other threads:[~2011-04-04 9:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 9:12 wanlong.gao [this message]
2011-04-12 16:13 ` [PATCH]X86:PCI: Fix an uninitialized variable warning Jesse Barnes
2011-04-13 2:37 ` wanlong gao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1301908379-19283-1-git-send-email-wanlong.gao@gmail.com \
--to=wanlong.gao@gmail.com \
--cc=arnd@arndb.de \
--cc=harryxiyou@gmail.com \
--cc=jbarnes@virtuousgeek.org \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=prarit@redhat.com \
--cc=seto.hidetoshi@jp.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).