mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] rpc_delete_timer() cleanup
Date: Thu, 30 Jun 2005 17:11:59 +0400	[thread overview]
Message-ID: <42C3EF9F.D5E7761E@tv-sign.ru> (raw)

When rpc task receives a signal while sleeping on RPC_TASK_QUEUED bit,
__rpc_execute() calls rpc_wake_up_task(). If rpc timer starts on another
cpu at the same time it can set RPC_TASK_WAKEUP bit before rpc_wake_up_task()
called from __rpc_execute() does so. Now the main loop in __rpc_execute
restarted with RPC_TASK_QUEUED bit and with still executing tk_timer.

I don't see too bad in this (the task already has RPC_TASK_KILLED flag,
so ->tk_exit() should not call rpc_delay(), and it has TIF_SIGPENDING),
but still I think it was not intended to happen.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 2.6.13-rc1/net/sunrpc/sched.c~	Thu Jun 30 17:03:08 2005
+++ 2.6.13-rc1/net/sunrpc/sched.c	Thu Jun 30 17:03:25 2005
@@ -135,8 +135,6 @@ __rpc_add_timer(struct rpc_task *task, r
 static void
 rpc_delete_timer(struct rpc_task *task)
 {
-	if (RPC_IS_QUEUED(task))
-		return;
 	if (test_and_clear_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate)) {
 		del_singleshot_timer_sync(&task->tk_timer);
 		dprintk("RPC: %4d deleting timer\n", task->tk_pid);

                 reply	other threads:[~2005-06-30 13:02 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=42C3EF9F.D5E7761E@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=linux-kernel@vger.kernel.org \
    --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®