All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Chris Clayton <chris2553@googlemail.com>,
	Jaswinder Singh Rajput <jaswinder@kernel.org>,
	NeilBrown <neilb@suse.de>,
	linux-kernel@vger.kernel.org, scsi <linux-scsi@vger.kernel.org>,
	Tejun Heo <tj@kernel.org>,
	Arjan van de Ven <arjan@linux.intel.com>
Subject: Re: 2.6.30-rc8 Oops whilst booting
Date: Mon, 8 Jun 2009 10:42:14 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0906081039520.6847@localhost.localdomain> (raw)
In-Reply-To: <1244480796.4079.301.camel@mulgrave.site>



On Mon, 8 Jun 2009, James Bottomley wrote:
> 
> I think it's a bug in the async code.  It's providing cookies too high
> because it doesn't stop after it finds a running entry.
> 
> Can we try this as the fix?

Ok, this looks likely.

That said, why doesn't that function look like this?

		Linus
---
 kernel/async.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/kernel/async.c b/kernel/async.c
index 5054030..27235f5 100644
--- a/kernel/async.c
+++ b/kernel/async.c
@@ -92,23 +92,18 @@ extern int initcall_debug;
 static async_cookie_t  __lowest_in_progress(struct list_head *running)
 {
 	struct async_entry *entry;
-	async_cookie_t ret = next_cookie; /* begin with "infinity" value */
 
 	if (!list_empty(running)) {
 		entry = list_first_entry(running,
 			struct async_entry, list);
-		ret = entry->cookie;
+		return entry->cookie;
 	}
 
-	if (!list_empty(&async_pending)) {
-		list_for_each_entry(entry, &async_pending, list)
-			if (entry->running == running) {
-				ret = entry->cookie;
-				break;
-			}
-	}
+	list_for_each_entry(entry, &async_pending, list)
+		if (entry->running == running)
+			return entry->cookie;
 
-	return ret;
+	return next_cookie;	/* "infinity" value */
 }
 
 static async_cookie_t  lowest_in_progress(struct list_head *running)

  reply	other threads:[~2009-06-08 17:43 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-06 18:59 2.6.30-rc8 Oops whilst booting Chris Clayton
2009-06-06 21:15 ` Chris Clayton
2009-06-07 13:25   ` Jaswinder Singh Rajput
2009-06-07 18:38     ` Chris Clayton
2009-06-07 22:31       ` Jaswinder Singh Rajput
2009-06-07 22:55         ` NeilBrown
2009-06-08  8:08           ` Chris Clayton
2009-06-08  8:08             ` Chris Clayton
2009-06-08 10:58             ` Chris Clayton
2009-06-08 10:58               ` Chris Clayton
2009-06-08 11:34               ` Jaswinder Singh Rajput
2009-06-08 12:53                 ` Chris Clayton
2009-06-08 12:53                   ` Chris Clayton
2009-06-08 16:21                   ` Linus Torvalds
2009-06-08 16:21                     ` Linus Torvalds
2009-06-08 16:51                     ` James Bottomley
2009-06-08 17:06                       ` Jaswinder Singh Rajput
2009-06-08 17:45                         ` Chris Clayton
2009-06-08 17:45                           ` Chris Clayton
2009-06-08 18:21                           ` Linus Torvalds
2009-06-08 19:17                             ` Chris Clayton
2009-06-08 19:17                               ` Chris Clayton
2009-06-08 20:03                               ` Chris Clayton
2009-06-08 20:03                                 ` Chris Clayton
2009-06-08 17:21                       ` Linus Torvalds
2009-06-08 17:37                         ` Arjan van de Ven
2009-06-08 17:38                         ` James Bottomley
2009-06-08 17:06                     ` James Bottomley
2009-06-08 17:42                       ` Linus Torvalds [this message]
2009-06-08 17:49                         ` James Bottomley
2009-06-08 18:33                       ` Chris Clayton
2009-06-08 18:33                         ` Chris Clayton
2009-06-08 14:23             ` James Bottomley
2009-06-08 15:04               ` Chris Clayton
2009-06-08 15:04                 ` Chris Clayton
2009-06-08 15:17               ` Chris Clayton
2009-06-08 15:17                 ` Chris Clayton
2009-06-08 15:32                 ` James Bottomley

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=alpine.LFD.2.01.0906081039520.6847@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=arjan@linux.intel.com \
    --cc=chris2553@googlemail.com \
    --cc=jaswinder@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=tj@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.