Re: [PATCH] mm: vmscan: add BUG_ON on illegal return values fromscan_objects

From: Greg Kroah-Hartman
Date: Mon May 20 2013 - 09:56:24 EST

On Mon, May 20, 2013 at 11:14:27AM +0200, Oskar Andero wrote:
> Add a BUG_ON to catch any illegal value from the shrinkers. This fixes a
> potential bug if scan_objects returns a negative other than -1, which
> would lead to undefined behaviour.

So it's better to crash a machine and keep anyone from using it?
Instead of recovering from an error you found? Not good.

greg k-h
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at