Re: [PATCH] edac: fix buffer overrun if no suitable bandwidth found

2012-10-23 Thread Borislav Petkov
On Tue, Oct 23, 2012 at 12:10:05PM -0700, Andrew Morton wrote: That's pretty strange code in there. If the comment is to be believed, isn't this a suitable fix? --- a/drivers/edac/amd64_edac.c~a +++ a/drivers/edac/amd64_edac.c @@ -171,7 +171,7 @@ static int __amd64_set_scrub_rate(struct

Re: [PATCH] edac: fix buffer overrun if no suitable bandwidth found

2012-10-23 Thread Andrew Morton
On Tue, 23 Oct 2012 22:26:12 +0200 Borislav Petkov b...@amd64.org wrote: From: Denis Kirjanov kirja...@gmail.com Date: Mon, 22 Oct 2012 19:30:58 +0400 Subject: [PATCH] amd64_edac: Fix hypothetical out-of-bounds access Make sure we stay within scrubrates' array bounds. Boris: this is a

Re: [PATCH] edac: fix buffer overrun if no suitable bandwidth found

2012-10-23 Thread Borislav Petkov
On Tue, Oct 23, 2012 at 01:37:09PM -0700, Andrew Morton wrote: This is still strange. What's the point in having the initial loop even consider the last element in the array if we know we'll be using it anyway? You're right, yours is better. Now you only need to give me a proper patch with

Re: [PATCH] edac: fix buffer overrun if no suitable bandwidth found

2012-10-23 Thread Andrew Morton
On Tue, 23 Oct 2012 22:49:26 +0200 Borislav Petkov b...@amd64.org wrote: Now you only need to give me a proper patch with your S-O-B and we're ready to go :). who, me, what?!?! Sounds stressful. umm, OK here we go. What I don't understand is the effects of the bug. If the present code can

Re: [PATCH] edac: fix buffer overrun if no suitable bandwidth found

2012-10-23 Thread Borislav Petkov
On Tue, Oct 23, 2012 at 02:09:39PM -0700, Andrew Morton wrote: On Tue, 23 Oct 2012 22:49:26 +0200 Borislav Petkov b...@amd64.org wrote: Now you only need to give me a proper patch with your S-O-B and we're ready to go :). who, me, what?!?! Sounds stressful. Yeah, this is to show you

Re: [PATCH] edac: fix buffer overrun if no suitable bandwidth found

2012-10-23 Thread Andrew Morton
On Tue, 23 Oct 2012 23:38:45 +0200 Borislav Petkov b...@amd64.org wrote: And I see you'll carry this patch so I won't send it to Linus next merge window so thanks for this! No, please merge it yourself. Once it (or a version of it) turns up in linux-next, I'll drop my copy. Merging stuff I