From: Denis Kirjanov <kirjanov@gmail.com>
To: linux-edac@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, stable@kernel.org,
Denis Kirjanov <kirjanov@gmail.com>
Subject: [PATCH] edac: fix buffer overrun if no suitable bandwidth found
Date: Mon, 22 Oct 2012 19:30:58 +0400 [thread overview]
Message-ID: <1350919858-26202-1-git-send-email-kirjanov@gmail.com> (raw)
fix buffer overrun if no suitable bandwidth found
Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
---
drivers/edac/amd64_edac.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 5a297a2..d85ad9e 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -188,6 +188,9 @@ static int __amd64_set_scrub_rate(struct pci_dev *ctl, u32 new_bw, u32 min_rate)
* scrubrates array.
*/
}
+ if (i == ARRAY_SIZE(scrubrates)) {
+ i--;
+ }
scrubval = scrubrates[i].scrubval;
--
1.7.9.5
next reply other threads:[~2012-10-22 15:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 15:30 Denis Kirjanov [this message]
2012-10-23 15:39 ` Borislav Petkov
2012-10-23 19:10 ` Andrew Morton
2012-10-23 20:26 ` Borislav Petkov
2012-10-23 20:37 ` Andrew Morton
2012-10-23 20:49 ` Borislav Petkov
2012-10-23 21:09 ` Andrew Morton
2012-10-23 21:38 ` Borislav Petkov
2012-10-23 21:58 ` Andrew Morton
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=1350919858-26202-1-git-send-email-kirjanov@gmail.com \
--to=kirjanov@gmail.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
/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
all inboxes | Powered by JetHome®