lkml.org 
[lkml]   [1998]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectsmall bug in memory_lseek()
Hi,

In memory_lseek() in drivers/char/mem.c, the code to stop successful
seeks on negative offsets giving what look like error returns (as
described in the comment) is never reached. A patch to fix this
follows.

This bug causes the klogd in RedHat5.0 to fail with a syslog message
something like "error seeking on /dev/kmem", as observed by David
Burrows a bit ago.

Dave Wragg.

diff -rub linux-2.1.86/drivers/char/mem.c linux-2.1.86.kmem/drivers/char/mem.c
--- linux-2.1.86/drivers/char/mem.c Tue Jan 27 20:28:36 1998
+++ linux-2.1.86.kmem/drivers/char/mem.c Thu Feb 12 01:58:00 1998
@@ -374,10 +374,10 @@
switch (orig) {
case 0:
file->f_pos = offset;
- return file->f_pos;
+ break;
case 1:
file->f_pos += offset;
- return file->f_pos;
+ break;
default:
return -EINVAL;
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.117 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site