lkml.org 
[lkml]   [2003]   [Nov]   [28]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateFri, 28 Nov 2003 11:49:34 +0530
FromRaj <>
SubjectRe: [BUG] scheduling while atomic when lseek()ing in /proc/net/tcp
Tore Anderson wrote:

>  Hi,
>
>  The following code instantly freezes my all of my machines running 
> any of the beavers:
> 
>
The following patch fixed this, but i am _not_not_not sure whether this 
is the right way to do.
Any ideas folks ?

/Raj




--- seq_file.c.org	2003-11-28 11:12:28.000000000 +0530
+++ seq_file.c	2003-11-28 11:44:44.968883784 +0530
@@ -213,6 +213,9 @@
 	switch (origin) {
 		case 1:
 			offset += file->f_pos;
+			if(offset >= 0)
+				retval = file->f_pos = offset;
+			break;
 		case 0:
 			if (offset < 0)
 				break;
\
 
 \ /
  Last update: 2005-03-22 13:58    [from the cache]
©2003-2008