]> git.hungrycats.org Git - linux/commit
[PATCH] resource.c bounds checking fix
authorAndrew Morton <akpm@osdl.org>
Tue, 18 Nov 2003 16:16:42 +0000 (08:16 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 18 Nov 2003 16:16:42 +0000 (08:16 -0800)
commit9069925a77841425230c039a9375925d210badb0
tree76bf1a38352a7032e19eef8cd325110ab8e5733f
parent0693b7686f5bf84dfd4284381449bb1bd96d8ff6
[PATCH] resource.c bounds checking fix

From: Jeremy Higdon <jeremy@classic.engr.sgi.com>

I believe there is a bug in kernel/resource.c.

We (SGI sn2 I/O code) are using this for allocating dma map resources, and
we tracked failures we were seeing to find_resource().

The problem is that when testing bounds in the forever loop, the end bound
would be one higher than it should be if it gets set from another resource
(it's set to the proper value when it gets set from the root), causing
find_resource to return an invalid min/max when the requested size was one
greater than would fit between two existing resources.
kernel/resource.c