Re: [BK-2.4] [PATCH] Small do_mmap_pgoff correction

From: David S. Miller (davem@redhat.com)
Date: Tue Dec 10 2002 - 17:14:51 EST


   From: DervishD <raul@pleyades.net>
   Date: Tue, 10 Dec 2002 23:13:57 +0100
   
       Sincerely, I don't understand why this patch is bad. Is no worse
   than the previous situation :??
   
How about something like:

        if (len == 0)
                return addr;

        len = PAGE_ALIGN(len);
        if (len > TASK_SIZE || len == 0)
                return -EINVAL;

That should cover all cases and not make the TASK_SIZE assumption.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Dec 15 2002 - 22:00:18 EST