Messages in this thread |  | | Date | Fri, 2 Feb 2001 01:25:50 -0800 | From | Prasanna P Subash <> | Subject | [Patch]Re: Serious reproducible 2.4.x kernel hang |
| |
> #include <stdio.h> > #include <unistd.h> > #include <sys/types.h> > #include <sys/socket.h> > > int > main(int argc, const char* argv[]) > { > int retval; > int sockets[2]; > char buf[1]; > > retval = socketpair(PF_UNIX, SOCK_DGRAM, 0, sockets); > if (retval != 0) > { > perror("socketpair"); > exit(1); > } > shutdown(sockets[0], SHUT_RDWR); > read(sockets[0], buf, 1); > }
I tried to debug this issue with the kdb on 2.4.1-pre7. Here is the stack trace
mcount+0x1f9 wait_for_packet+0x13 skb_recv_datagram+0xbb unix_dgram_recvmsg+0x53 sock_recvmsg+0x41 sock_read+0x8f sys_read+0xa4 system_call+0x3c
I looked at the skb_recv_datagram code and noticed that wait_for_packet is not returning an error, even while trying to read a closed socket. Anyways here is a patch against 2.4.1 that will fix the issue. Please feel free to flame me about the patch :)
thanks -- Prasanna Subash --- psubash@turbolinux.com --- TurboLinux, INC ------------------------------------------------------------------------ Linux, the choice | Q: How do you keep a moron in suspense? of a GNU generation -o) | Kernel 2.2.16 /\\ | on a i686 _\\_v | | ------------------------------------------------------------------------ [unhandled content-type:application/x-patch][unhandled content-type:application/pgp-signature]
|  |