From: <gregkh@linuxfoundation.org>
To: bart.vanassche@sandisk.com, dledford@redhat.com,
gregkh@linuxfoundation.org, sagig@mellanox.com,
sebastian.riemer@profitbricks.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "IB/srp: Remove an extraneous scsi_host_put() from an error path" has been added to the 4.1-stable tree
Date: Thu, 16 Jul 2015 19:41:52 -0700 [thread overview]
Message-ID: <1437100912202195@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
IB/srp: Remove an extraneous scsi_host_put() from an error path
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ib-srp-remove-an-extraneous-scsi_host_put-from-an-error-path.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From fb49c8bbaae70b14fea2b4590a90a21539f88526 Mon Sep 17 00:00:00 2001
From: Bart Van Assche <bart.vanassche@sandisk.com>
Date: Mon, 18 May 2015 13:23:14 +0200
Subject: IB/srp: Remove an extraneous scsi_host_put() from an error path
From: Bart Van Assche <bart.vanassche@sandisk.com>
commit fb49c8bbaae70b14fea2b4590a90a21539f88526 upstream.
Fix a scsi_get_host() / scsi_host_put() imbalance in the error
path of srp_create_target(). See also patch "IB/srp: Avoid that
I/O hangs due to a cable pull during LUN scanning" (commit ID
34aa654ecb8e).
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/infiniband/ulp/srp/ib_srp.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -3172,11 +3172,11 @@ static ssize_t srp_create_target(struct
ret = srp_parse_options(buf, target);
if (ret)
- goto err;
+ goto out;
ret = scsi_init_shared_tag_map(target_host, target_host->can_queue);
if (ret)
- goto err;
+ goto out;
target->req_ring_size = target->queue_size - SRP_TSK_MGMT_SQ_SIZE;
@@ -3187,7 +3187,7 @@ static ssize_t srp_create_target(struct
be64_to_cpu(target->ioc_guid),
be64_to_cpu(target->initiator_ext));
ret = -EEXIST;
- goto err;
+ goto out;
}
if (!srp_dev->has_fmr && !srp_dev->has_fr && !target->allow_ext_sg &&
@@ -3208,7 +3208,7 @@ static ssize_t srp_create_target(struct
spin_lock_init(&target->lock);
ret = ib_query_gid(ibdev, host->port, 0, &target->sgid);
if (ret)
- goto err;
+ goto out;
ret = -ENOMEM;
target->ch_count = max_t(unsigned, num_online_nodes(),
@@ -3219,7 +3219,7 @@ static ssize_t srp_create_target(struct
target->ch = kcalloc(target->ch_count, sizeof(*target->ch),
GFP_KERNEL);
if (!target->ch)
- goto err;
+ goto out;
node_idx = 0;
for_each_online_node(node) {
@@ -3315,9 +3315,6 @@ err_disconnect:
}
kfree(target->ch);
-
-err:
- scsi_host_put(target_host);
goto out;
}
Patches currently in stable-queue which might be from bart.vanassche@sandisk.com are
queue-4.1/ib-srp-fix-a-connection-setup-race.patch
queue-4.1/scsi_transport_srp-introduce-srp_wait_for_queuecommand.patch
queue-4.1/ib-srp-fix-connection-state-tracking.patch
queue-4.1/ib-srp-fix-reconnection-failure-handling.patch
queue-4.1/scsi_transport_srp-fix-a-race-condition.patch
queue-4.1/ib-srp-remove-an-extraneous-scsi_host_put-from-an-error-path.patch
reply other threads:[~2015-07-17 2:41 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=1437100912202195@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bart.vanassche@sandisk.com \
--cc=dledford@redhat.com \
--cc=sagig@mellanox.com \
--cc=sebastian.riemer@profitbricks.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@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.