Skip to contentSkip to conversation

IA-32 support patch: munmap should return EINVAL if size == 0

PATCH Applied Arun Sharma 2 participants 2 messages Jun 24, 2003 – Jun 30, 2003

lore
Share & tools
lore
#0 lore raw

Native IA-32 returns EINVAL on a unmap of size 0. Our behavior is currently not compatible.

Please apply to both 2.4 and 2.5.

-Arun

arch/ia64/ia32/sys_ia32.c +1 -1
@@ -547,7 +547,7 @@
 #if PAGE_SHIFT <= IA32_PAGE_SHIFT
 	ret = sys_munmap(start, end - start);
 #else
-	if (start > end)
+	if (start >= end)
 		return -EINVAL;
 
 	start = PAGE_ALIGN(start);
#1 lore raw
Quoted 4 lines · Arun Sharma

Native IA-32 returns EINVAL on a unmap of size 0. Our behavior is currently not compatible.

Please apply to both 2.4 and 2.5.

Applied to 2.4 (and David put it in 2.5 as well).