===== mm/mremap.c 1.33 vs edited ===== --- 1.33/mm/mremap.c Sat Aug 23 23:50:10 2003 +++ edited/mm/mremap.c Mon Jan 5 08:34:21 2004 @@ -315,6 +315,10 @@ old_len = PAGE_ALIGN(old_len); new_len = PAGE_ALIGN(new_len); + /* Don't allow the degenerate cases */ + if (!(old_len | new_len)) + goto out; + /* new_addr is only valid if MREMAP_FIXED is specified */ if (flags & MREMAP_FIXED) { if (new_addr & ~PAGE_MASK)