Re: [PATCH v2] lib: gcd: prevent possible div by 0

2012-09-12 Thread Nick Bowler
On 2012-09-12 12:36 -0700, Andrew Morton wrote: > On Wed, 12 Sep 2012 21:20:30 +0200 > Davidlohr Bueso wrote: > > On Wed, 2012-09-12 at 12:10 -0700, Andrew Morton wrote: > > > On Mon, 10 Sep 2012 16:35:19 +0200 > > > Davidlohr Bueso wrote: > > > > > > > Account for all properties when a and/or b

Re: [PATCH v2] lib: gcd: prevent possible div by 0

2012-09-12 Thread Davidlohr Bueso
On Wed, 2012-09-12 at 12:36 -0700, Andrew Morton wrote: > On Wed, 12 Sep 2012 21:20:30 +0200 > Davidlohr Bueso wrote: > > > On Wed, 2012-09-12 at 12:10 -0700, Andrew Morton wrote: > > > On Mon, 10 Sep 2012 16:35:19 +0200 > > > Davidlohr Bueso wrote: > > > > > > > Account for all properties when

Re: [PATCH v2] lib: gcd: prevent possible div by 0

2012-09-12 Thread Greg Kroah-Hartman
On Wed, Sep 12, 2012 at 09:05:06PM +0200, Davidlohr Bueso wrote: > ping? Cc'ing Greg for stable. Why? That's not how a patch gets added to the stable tree, right? greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel

Re: [PATCH v2] lib: gcd: prevent possible div by 0

2012-09-12 Thread Andrew Morton
On Wed, 12 Sep 2012 21:20:30 +0200 Davidlohr Bueso wrote: > On Wed, 2012-09-12 at 12:10 -0700, Andrew Morton wrote: > > On Mon, 10 Sep 2012 16:35:19 +0200 > > Davidlohr Bueso wrote: > > > > > Account for all properties when a and/or b are 0: > > > gcd(0, 0) = 0 > > > gcd(a, 0) = a > > > gcd(0,

Re: [PATCH v2] lib: gcd: prevent possible div by 0

2012-09-12 Thread Davidlohr Bueso
On Wed, 2012-09-12 at 12:10 -0700, Andrew Morton wrote: > On Mon, 10 Sep 2012 16:35:19 +0200 > Davidlohr Bueso wrote: > > > Account for all properties when a and/or b are 0: > > gcd(0, 0) = 0 > > gcd(a, 0) = a > > gcd(0, b) = b > > > > Cc: sta...@vger.kernel.org > > Why cc:stable? If this patc

Re: [PATCH v2] lib: gcd: prevent possible div by 0

2012-09-12 Thread Andrew Morton
On Mon, 10 Sep 2012 16:35:19 +0200 Davidlohr Bueso wrote: > Account for all properties when a and/or b are 0: > gcd(0, 0) = 0 > gcd(a, 0) = a > gcd(0, b) = b > > Cc: sta...@vger.kernel.org Why cc:stable? If this patch fixes some known problem in the current kernel then that really really shoul

Re: [PATCH v2] lib: gcd: prevent possible div by 0

2012-09-12 Thread Davidlohr Bueso
ping? Cc'ing Greg for stable. On Mon, 2012-09-10 at 16:35 +0200, Davidlohr Bueso wrote: > Account for all properties when a and/or b are 0: > gcd(0, 0) = 0 > gcd(a, 0) = a > gcd(0, b) = b > > Cc: sta...@vger.kernel.org > Signed-off-by: Davidlohr Bueso > --- > V2: simplified checking with b = 0 (

[PATCH v2] lib: gcd: prevent possible div by 0

2012-09-10 Thread Davidlohr Bueso
Account for all properties when a and/or b are 0: gcd(0, 0) = 0 gcd(a, 0) = a gcd(0, b) = b Cc: sta...@vger.kernel.org Signed-off-by: Davidlohr Bueso --- V2: simplified checking with b = 0 (Eric) lib/gcd.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/gcd.c b/lib/gcd.c index cce