public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH] block: fix intermittent dm timeout based oops
Date: Fri, 3 Apr 2009 16:32:08 +0200	[thread overview]
Message-ID: <20090403143208.GA10005@schmichrtp.de.ibm.com> (raw)
In-Reply-To: <20090324071730.53D7118C7A2@pentland.suse.de>

On Tue, Mar 24, 2009 at 08:17:30AM +0100, Hannes Reinecke wrote:
> Very rarely under stress testing of dm, oopses are occuring as
> something tampers with an old stack frame.  This has been traced back
> to blk_abort_queue() leaving a timeout_list pointing to the stack.
> The reason is that sometimes blk_abort_request() won't delete the
> timer (if the request is marked as complete but before the timer has
> been removed, a small race window).  Fix this by splicing back from
> the ususally empty list to the q->timeout_list.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  block/blk-timeout.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/block/blk-timeout.c b/block/blk-timeout.c
> index bbbdc4b..6213123 100644
> --- a/block/blk-timeout.c
> +++ b/block/blk-timeout.c
> @@ -224,6 +224,12 @@ void blk_abort_queue(struct request_queue *q)
>  	list_for_each_entry_safe(rq, tmp, &list, timeout_list)
>  		blk_abort_request(rq);
> 
> +	/*
> +	 * Occasionally, blk_abort_request() will return without
> +	 * deleting the element from the list
> +	 */
> +	list_splice(&list, &q->timeout_list);
> +
>  	spin_unlock_irqrestore(q->queue_lock, flags);
> 
>  }
> -- 
> 1.5.3.2

I just noticed that this fix is not upstream yet and i have seen test
cases hitting this problem.

Jens, are you going to included this patch, or should this go through
the SCSI tree?

--
Christof Schmitt

  reply	other threads:[~2009-04-03 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24  7:17 [PATCH] block: fix intermittent dm timeout based oops Hannes Reinecke
2009-04-03 14:32 ` Christof Schmitt [this message]
2009-04-03 14:35   ` James Bottomley
2009-04-03 18:01   ` Jens Axboe
2009-04-23  8:21     ` Christof Schmitt
2009-04-23  8:31       ` Jens Axboe

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=20090403143208.GA10005@schmichrtp.de.ibm.com \
    --to=christof.schmitt@de.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=hare@suse.de \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox