From: Mike Snitzer <snitzer@redhat.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org, Babu Moger <babu.moger@lsi.com>,
Mike Snitzer <snitzer@redhat.com>
Subject: [PATCH v2] [SCSI] scsi_dh_rdac: avoid possible deadlock in queue_mode_select
Date: Fri, 7 Jan 2011 14:51:18 -0500 [thread overview]
Message-ID: <1294429878-5999-1-git-send-email-snitzer@redhat.com> (raw)
From: Babu Moger <babu.moger@lsi.com>
Use GFP_NOIO when allocating memory during activation of a new path to
avoid possiblility of triggering recursive writeback to a failed path.
A failed IO could cause the path to go down, then we would call
queue_mode_select() to active a new path. Allocating memory using
GFP_KERNEL is bad to use here because completing the allocation may
require the system to write out pages to the same disk that just had
the failed path.
Signed-off-by: Babu Moger <babu.moger@lsi.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
drivers/scsi/device_handler/scsi_dh_rdac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
v2: just refreshed and tweaked the patch header
- v1 is available here: https://patchwork.kernel.org/patch/71073/
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
index 5be3ae1..566effd 100644
--- a/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -625,7 +625,7 @@ static int queue_mode_select(struct scsi_device *sdev,
struct rdac_queue_data *qdata;
struct rdac_controller *ctlr;
- qdata = kzalloc(sizeof(*qdata), GFP_KERNEL);
+ qdata = kzalloc(sizeof(*qdata), GFP_NOIO);
if (!qdata)
return SCSI_DH_RETRY;
reply other threads:[~2011-01-07 19:51 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=1294429878-5999-1-git-send-email-snitzer@redhat.com \
--to=snitzer@redhat.com \
--cc=James.Bottomley@suse.de \
--cc=babu.moger@lsi.com \
--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;
as well as URLs for NNTP newsgroup(s).