X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=kernel%2Fresource.c;h=790f1b807f1285b12557325823ed782d83a84a65;hb=f3eb8f09756d521f0aa12fa424c576cc10f443d1;hp=54ba6de3757c7ebdc83ad7f6c5b3d22b9d20f600;hpb=26cd94744e142dd5d5a21e2c1e31bacc120b2d74;p=mirror_ubuntu-bionic-kernel.git diff --git a/kernel/resource.c b/kernel/resource.c index 54ba6de3757c..790f1b807f12 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -651,7 +651,8 @@ static int __find_resource(struct resource *root, struct resource *old, alloc.start = constraint->alignf(constraint->alignf_data, &avail, size, constraint->align); alloc.end = alloc.start + size - 1; - if (resource_contains(&avail, &alloc)) { + if (alloc.start <= alloc.end && + resource_contains(&avail, &alloc)) { new->start = alloc.start; new->end = alloc.end; return 0;