From: Douglas Gilbert <dgilbert@interlog.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] sg: fix q->queue_lock on scsi_error_handler path
Date: Fri, 03 Apr 2009 11:11:52 -0400 [thread overview]
Message-ID: <49D62738.9010807@interlog.com> (raw)
In-Reply-To: <20090403192745E.fujita.tomonori@lab.ntt.co.jp>
FUJITA Tomonori wrote:
> This is a fix for another fallout of the block layer conversion (sorry
> again).
>
> This should be go into 2.6.28.y and 2.6.29.y.
>
> However, this should go with patches that I sent for 2.6.29.1 and
> were dropped. So I don't use 'stable@kernel.org' tag.
>
> =
> From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Subject: [PATCH] [PATCH] sg: fix q->queue_lock on scsi_error_handler path
>
> sg_rq_end_io() is called via rq->end_io. In some rare cases,
> sg_rq_end_io calls blk_put_request/blk_rq_unmap_user (when a program
> issuing a command has gone before the command completion; e.g. by
> interrupting a program issuing a command before the command
> completes).
>
> We can't call blk_put_request/blk_rq_unmap_user in interrupt so the
> commit c96952ed7031e7c576ecf90cf95b8ec099d5295a uses
> execute_in_process_context().
>
> The problem is that scsi_error_handler() calls rq->end_io too. We
> can't call blk_put_request/blk_rq_unmap_user too in this path (we hold
> q->queue_lock).
>
> To avoid the above problem, in these rare cases, this patch always
> uses schedule_work() instead of execute_in_process_context().
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
prev parent reply other threads:[~2009-04-03 15:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-03 10:28 [PATCH] sg: fix q->queue_lock on scsi_error_handler path FUJITA Tomonori
2009-04-03 15:11 ` Douglas Gilbert [this message]
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=49D62738.9010807@interlog.com \
--to=dgilbert@interlog.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--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 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.