>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/