Re: [BUG] scheduling while atomic when lseek()ing in /proc/net/tcp
From: Raj
Date: Fri Nov 28 2003 - 01:16:56 EST
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;