linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <cel@citi.umich.edu>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux NFS List <nfs@lists.sourceforge.net>
Subject: [PATCH] prevent oops in xprt_lock_write, against 2.4.20
Date: Fri, 30 Aug 2002 18:22:31 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0208301817150.1653-100000@dexter.citi.umich.edu> (raw)

hi marcelo-

when several RPC requests want to reconnect a TCP transport socket at
once, xprt_lock_write serializes the tasks to prevent multiple socket
connects.  however, TCP connects are always done by a RPC child task that
has no request slot.  xprt_lock_write can oops if there is no request slot
allocated to the invoking RPC task.  reviewed and accepted by Trond.

i had thought the 2.5.32 patch wouldn't apply to 2.4.20, but Trond pointed
out to me that his xprt_lock_write patches snuck into 2.4.20-pre5, which i
hadn't noticed.


--- 2.4.20-pre5/net/sunrpc/xprt.c.orig	Fri Aug 30 15:49:28 2002
+++ 2.4.20-pre5/net/sunrpc/xprt.c	Fri Aug 30 18:16:17 2002
@@ -147,5 +147,5 @@
 		task->tk_timeout = 0;
 		task->tk_status = -EAGAIN;
-		if (task->tk_rqstp->rq_nresend)
+		if (task->tk_rqstp && task->tk_rqstp->rq_nresend)
 			rpc_sleep_on(&xprt->resend, task, NULL, NULL);
 		else

-- 

corporate:	<cel at netapp dot com>
personal:	<chucklever at bigfoot dot com>



                 reply	other threads:[~2002-08-30 22:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.44.0208301817150.1653-100000@dexter.citi.umich.edu \
    --to=cel@citi.umich.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=nfs@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).