Re: [PATCH] mm: incorrect overflow check in shrink_slab()

From: Andrew Morton
Date: Thu Dec 01 2011 - 15:54:58 EST


On Thu, 1 Dec 2011 18:32:02 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> > total_scan is unsigned long, so the overflow check (total_scan < 0)
> > didn't work.
> >
> > Signed-off-by: Xi Wang <xi.wang@xxxxxxxxx>
>
> Nice catch but.... the 'total_scan" shouldn't be long ?
> Rather than type casting ?

Konstantin Khlebnikov's "vmscan: fix initial shrinker size handling"
does change it to `long'. That patch is in -mm and linux-next and is
queued for 3.3. It was queued for 3.2 but didn't make it due to some
me/Dave Chinner confusion.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/