• Andrew Morton's avatar
    [PATCH] resource.c bounds checking fix · 9069925a
    Andrew Morton authored
    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.
    9069925a
resource.c 10.3 KB