mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@daterainc.com>
To: target-devel <target-devel@vger.kernel.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Moussa Ba <moussaba@micron.com>,
	Or Gerlitz <ogerlitz@mellanox.com>,
	Mike Christie <michaelc@cs.wisc.edu>,
	Nicholas Bellinger <nab@linux-iscsi.org>
Subject: [PATCH 0/2] iscsi/iser-target: Fix
Date: Wed, 13 Nov 2013 02:11:41 +0000	[thread overview]
Message-ID: <1384308703-10034-1-git-send-email-nab@daterainc.com> (raw)

From: Nicholas Bellinger <nab@linux-iscsi.org>

Hi folks,

Here are the two patches to address the regression bug that Moussa
has recently been hitting with ib_isert ports + mtip32xx backends.

In the end, this bug was due to an incorrect usage of mutex_trylock(),
that was originally introduced to avoid an ib_isert specific nested
deadlock from an exception path, that inadvertently allowed normal
per RX/TX process context contention to increment sess->max_cmd_sn +
post a response + receive a new command in RX context with a CmdSN
larger than the last MaxCmdSN sychronized across RX/TX contexts.

This patch simply avoids the ib_isert callback in lio_queue_status()
for the special iscsi_execute_cmd() exception cases to avoid the
dead-lock, which allows the problematic mutex_trylock() usage in
iscsit_increment_maxcmdsn() to go away entirely.

I'll be including both of these with a CC' to stable for v3.10+

Special thanks to Moussa for helping track this bug down.

--nab

Nicholas Bellinger (2):
  iscsi-target: Fix mutex_trylock usage in iscsit_increment_maxcmdsn
  ib_isert: Avoid duplicate iscsit_increment_maxcmdsn call

 drivers/infiniband/ulp/isert/ib_isert.c      |    6 +-----
 drivers/target/iscsi/iscsi_target_configfs.c |    5 +++++
 drivers/target/iscsi/iscsi_target_device.c   |    6 +-----
 3 files changed, 7 insertions(+), 10 deletions(-)

-- 
1.7.10.4


             reply	other threads:[~2013-11-13  2:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13  2:11 Nicholas A. Bellinger [this message]
2013-11-13  2:11 ` [PATCH 1/2] iscsi-target: Fix mutex_trylock usage in iscsit_increment_maxcmdsn Nicholas A. Bellinger
2013-11-13  2:11 ` [PATCH 2/2] ib_isert: Avoid duplicate iscsit_increment_maxcmdsn call Nicholas A. Bellinger

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=1384308703-10034-1-git-send-email-nab@daterainc.com \
    --to=nab@daterainc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=moussaba@micron.com \
    --cc=nab@linux-iscsi.org \
    --cc=ogerlitz@mellanox.com \
    --cc=target-devel@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

all inboxes | Powered by JetHome®