public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Prasanna P Subash <psubash@turbolinux.com>
To: Chris Evans <chris@scary.beasts.org>
Cc: Malcolm Beattie <mbeattie@sable.ox.ac.uk>,
	linux-kernel@vger.kernel.org, davem@redhat.com
Subject: [Patch]Re: Serious reproducible 2.4.x kernel hang
Date: Fri, 2 Feb 2001 01:25:50 -0800	[thread overview]
Message-ID: <20010202012550.A9756@turbolinux.com> (raw)
In-Reply-To: <20010201165247.D27009@sable.ox.ac.uk> <Pine.LNX.4.30.0102011826060.397-100000@ferret.lmh.ox.ac.uk>
In-Reply-To: <Pine.LNX.4.30.0102011826060.397-100000@ferret.lmh.ox.ac.uk>; from Chris Evans on Thu, Feb 01, 2001 at 06:28:45PM +0000


[-- Attachment #1.1: Type: text/plain, Size: 1359 bytes --]

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

[-- Attachment #1.2: dgram.patch --]
[-- Type: application/x-patch, Size: 597 bytes --]

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  parent reply	other threads:[~2001-02-02  9:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-01 14:14 Serious reproducible 2.4.x kernel hang Chris Evans
2001-02-01 14:40 ` Malcolm Beattie
2001-02-01 15:27   ` Chris Evans
2001-02-01 15:30   ` Malcolm Beattie
2001-02-01 16:03     ` Chris Evans
2001-02-01 16:52       ` Malcolm Beattie
2001-02-01 18:28         ` Chris Evans
2001-02-01 18:41           ` Doug McNaught
2001-02-01 18:42           ` rui.sousa
2001-02-02  9:25           ` Prasanna P Subash [this message]
2001-02-02  9:29             ` [Patch]Re: " David S. Miller
2001-02-03 20:26   ` kees

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010202012550.A9756@turbolinux.com \
    --to=psubash@turbolinux.com \
    --cc=chris@scary.beasts.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbeattie@sable.ox.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox