public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: paulmck@us.ibm.com
Cc: Andrew Morton <akpm@osdl.org>, Dipankar <dipankar@in.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Fix bug in RCU torture test
Date: Mon, 5 Dec 2005 16:28:49 +0530	[thread overview]
Message-ID: <20051205105849.GD2385@in.ibm.com> (raw)

While doing some test of RCU torture module, I hit a OOPS in rcu_do_batch,
which was trying to processes callback of a module that was just removed.
This is because we weren't waiting long enough for all callbacks to fire.

Patch below fixes that.

Signed-off-by : Srivatsa Vaddagiri <vatsa@in.ibm.com>


---

 linux-2.6.15-rc5-mm1-root/kernel/rcutorture.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN kernel/rcutorture.c~rcutorture_fix kernel/rcutorture.c
--- linux-2.6.15-rc5-mm1/kernel/rcutorture.c~rcutorture_fix	2005-12-05 15:33:06.000000000 +0530
+++ linux-2.6.15-rc5-mm1-root/kernel/rcutorture.c	2005-12-05 15:33:17.000000000 +0530
@@ -408,9 +408,8 @@ rcu_torture_cleanup(void)
 	stats_task = NULL;
 
 	/* Wait for all RCU callbacks to fire.  */
+	rcu_barrier();
 
-	for (i = 0; i < RCU_TORTURE_PIPE_LEN; i++)
-		synchronize_rcu();
 	rcu_torture_stats_print();  /* -After- the stats thread is stopped! */
 	printk(KERN_ALERT TORTURE_FLAG
 	       "--- End of test: %s\n",

_


-- 


Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017

             reply	other threads:[~2005-12-05 10:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-05 10:58 Srivatsa Vaddagiri [this message]
2005-12-05 12:34 ` [PATCH] Fix bug in RCU torture test Dipankar Sarma
2005-12-05 13:56 ` Paul E. McKenney

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=20051205105849.GD2385@in.ibm.com \
    --to=vatsa@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=dipankar@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@us.ibm.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