From ec633e349a91593c7de53b254059f84fc1ad29bc Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Mon, 4 Feb 2008 22:29:18 -0800 Subject: [PATCH] --- yaml --- r: 83087 b: refs/heads/master c: 5dc331852848a38ca00a2817e5b98a1d0561b116 h: refs/heads/master i: 83085: a08195b7feb0a6e976ab43ca9350bac84f3db8a8 83083: f24413bf061b0d7b3f2c0a82a473aac50bf4fec3 83079: acadafc7d31822520f844d004e50d84283a3b9b6 83071: 6fc1dad56ceed783ec8696920864194a5935da07 v: v3 --- [refs] | 2 +- trunk/mm/vmalloc.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 0a7133bc26d2..595e30b1964c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a7f75e25860ac0a7b70cf6e14c37618d2d2bb890 +refs/heads/master: 5dc331852848a38ca00a2817e5b98a1d0561b116 diff --git a/trunk/mm/vmalloc.c b/trunk/mm/vmalloc.c index 4efc41a6e2ab..0536dde139d1 100644 --- a/trunk/mm/vmalloc.c +++ b/trunk/mm/vmalloc.c @@ -254,6 +254,10 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, unsigned long fl if (addr > end - size) goto out; } + if ((size + addr) < addr) + goto out; + if (addr > end - size) + goto out; found: area->next = *p;