lkml.org 
[lkml]   [2000]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectfs/proc/array.c buglet
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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.027 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site