mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eduardo Pereira Habkost <ehabkost@conectiva.com.br>
To: trond.myklebust@fys.uio.no, neilb@cse.unsw.edu.au
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] race on rpc code
Date: Mon, 17 Mar 2003 20:25:25 -0300	[thread overview]
Message-ID: <20030317232525.GC23932@duckman.distro.conectiva> (raw)

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

Hi!

The following patch fixes a race on the rpc code, it is the
same race that was reported some weeks ago:
http://marc.theaimsgroup.com/?l=linux-kernel&m=104462124226133&w=2

After some minutes doing transfer of multiple files in parallel, it Oopses
at xprt_timer because task->tk_client is NULL. It can happens because
rpc_del_timer don't call timer_del_sync if the timer is running. But
if xprt_timer is running, it can can setup itself to run again, even if
the task is already being released by rpc_release_task.

-- 
Eduardo

diff -Nru a/net/sunrpc/sched.c b/net/sunrpc/sched.c
--- a/net/sunrpc/sched.c        Mon Mar 17 20:19:20 2003
+++ b/net/sunrpc/sched.c        Mon Mar 17 20:19:20 2003
@@ -169,10 +169,8 @@
 static inline void
 rpc_delete_timer(struct rpc_task *task)
 {
-       if (timer_pending(&task->tk_timer)) {
-               dprintk("RPC: %4d deleting timer\n", task->tk_pid);
-               del_timer_sync(&task->tk_timer);
-       }
+       dprintk("RPC: %4d deleting timer\n", task->tk_pid);
+       del_timer_sync(&task->tk_timer);
 }

 /*

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

                 reply	other threads:[~2003-03-17 23:15 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=20030317232525.GC23932@duckman.distro.conectiva \
    --to=ehabkost@conectiva.com.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    --cc=trond.myklebust@fys.uio.no \
    /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®