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 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 shouldn't is m

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 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 how we

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 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 indeed start

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:26:12 +0200 Borislav Petkov wrote: > From: Denis Kirjanov > 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 correctness fix only because

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(st

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

2012-10-23 Thread Andrew Morton
On Mon, 22 Oct 2012 19:30:58 +0400 Denis Kirjanov wrote: > fix buffer overrun if no suitable bandwidth found > > Signed-off-by: Denis Kirjanov > --- > 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

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

2012-10-23 Thread Borislav Petkov
On Mon, Oct 22, 2012 at 07:30:58PM +0400, Denis Kirjanov wrote: > fix buffer overrun if no suitable bandwidth found > > Signed-off-by: Denis Kirjanov Applied with modifications and stable dropped. Thanks. -- Regards/Gruss, Boris. Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach GM:

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

2012-10-22 Thread Denis Kirjanov
fix buffer overrun if no suitable bandwidth found Signed-off-by: Denis Kirjanov --- 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/driver