lkml.org 
[lkml]   [1998]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.122 oops with java
On Mon, 28 Sep 1998, Slava wrote:

>Hello everybody,
>
>My jEdit editor (written in Java, available at my homepage) oopeses when
>an
>attempt is made to read from a Unix domain socket. C programs don't seem
>to be
>affected. This is kernel 2.1.122 with no non-standard patches + libc

java interpreter is a C program ;-).

This proggy trigger the bug:

#include <fcntl.h>

main()
{
int fd = open("/dev/printer", O_RDONLY);
fcntl(fd, F_SETFL, O_ASYNC);
}


/dev/printer is a local socket of course.

This should fix the bug:

--- /home/andrea/devel/kernel-tree/linux-2.1.122/fs/fcntl.c Tue Aug 25 20:19:57 1998
+++ linux/fs/fcntl.c Mon Sep 28 17:37:52 1998
@@ -97,7 +97,7 @@

/* Did FASYNC state change? */
if ((arg ^ filp->f_flags) & FASYNC) {
- if (filp->f_op->fasync)
+ if (filp->f_op && filp->f_op->fasync)
filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0);
}

Andrea[s] Arcangeli




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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