Re: drivers/char/random.c line 728 BUG

From: Andrew Morton
Date: Wed Sep 03 2008 - 18:33:02 EST


On Wed, 03 Sep 2008 17:12:00 -0500
Matt Mackall <mpm@xxxxxxxxxxx> wrote:

> > Could we still apply his patch for the upcoming stable tree and fix it
> > the "right" way at some point in the future?
>
> I'm not sure what the current state of play is here in terms of the
> original patch being pushed to stable and mainline, but my patch is both
> simpler and more correct. If it's not too late, it's the one that should
> go to both places.

It's a fairly minor thing. The post-this-patch code takes care to
ensure that ->entropy_count never has an illegal value, so it's OK but
aesthetially unpleasing to check its value outside the lock.

And the post-this-patch code generates less .text, so it's a desirable
thing from that POV too.

We could/should do both, I guess. I kinda ducked your move-the-BUG
patch because I wasn't in a write-yet-another-changelog mood.

--
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/