From: "David S. Miller" <davem@redhat.com>
To: Prasanna P Subash <psubash@turbolinux.com>
Cc: Chris Evans <chris@scary.beasts.org>,
Malcolm Beattie <mbeattie@sable.ox.ac.uk>,
linux-kernel@vger.kernel.org
Subject: Re: [Patch]Re: Serious reproducible 2.4.x kernel hang
Date: Fri, 2 Feb 2001 01:29:15 -0800 (PST) [thread overview]
Message-ID: <14970.32235.542511.977558@pizda.ninka.net> (raw)
In-Reply-To: <20010202012550.A9756@turbolinux.com>
In-Reply-To: <20010201165247.D27009@sable.ox.ac.uk> <Pine.LNX.4.30.0102011826060.397-100000@ferret.lmh.ox.ac.uk> <20010202012550.A9756@turbolinux.com>
Prasanna P Subash writes:
> 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 :)
Please read the rest of today's postings, Alexey Kuznetsov already
posted the correct fix, which I'm attached below:
diff -u --recursive --new-file --exclude=CVS --exclude=.cvsignore vanilla/linux/net/core/datagram.c linux/net/core/datagram.c
--- vanilla/linux/net/core/datagram.c Sat Nov 11 19:02:40 2000
+++ linux/net/core/datagram.c Thu Feb 1 17:15:12 2001
@@ -72,19 +73,19 @@
/* Socket errors? */
error = sock_error(sk);
if (error)
- goto out;
+ goto out_err;
if (!skb_queue_empty(&sk->receive_queue))
goto ready;
/* Socket shut down? */
if (sk->shutdown & RCV_SHUTDOWN)
- goto out;
+ goto out_noerr;
/* Sequenced packets can come disconnected. If so we report the problem */
error = -ENOTCONN;
if(connection_based(sk) && !(sk->state==TCP_ESTABLISHED || sk->state==TCP_LISTEN))
- goto out;
+ goto out_err;
/* handle signals */
if (signal_pending(current))
@@ -99,11 +100,16 @@
interrupted:
error = sock_intr_errno(*timeo_p);
+out_err:
+ *err = error;
out:
current->state = TASK_RUNNING;
remove_wait_queue(sk->sleep, &wait);
- *err = error;
return error;
+out_noerr:
+ *err = 0;
+ error = 1;
+ goto out;
}
/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-02-02 9:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-01 14:14 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 ` [Patch]Re: " Prasanna P Subash
2001-02-02 9:29 ` David S. Miller [this message]
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=14970.32235.542511.977558@pizda.ninka.net \
--to=davem@redhat.com \
--cc=chris@scary.beasts.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbeattie@sable.ox.ac.uk \
--cc=psubash@turbolinux.com \
/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
all inboxes | Powered by JetHome®