The attached 1-character change fixes a performance bug in
linux-2.4.0-test9 (and earlier).  Without this patch, something as
simple as "cat /proc/self/maps" will read the "maps" file line by
line.

        --david

--- linux-2.4.0-test9/fs/proc/array.c   Fri Sep  8 14:34:59 2000
+++ lia64-kdb/fs/proc/array.c   Mon Oct  9 19:01:07 2000
@@ -575,7 +575,7 @@
                goto getlen_out;
 
        /* Check whether the mmaps could change if we sleep */
-       volatile_task = (task != current || atomic_read(&mm->mm_users) > 1);
+       volatile_task = (task != current || atomic_read(&mm->mm_users) > 2);
 
        /* decode f_pos */
        lineno = *ppos >> MAPS_LINE_SHIFT;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to