diff options
author | Roland Dreier <roland@purestorage.com> | 2014-06-30 07:02:20 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-30 20:09:47 -0700 |
commit | 3eee84071548d0d279d8f630404a5b16d45b42f2 (patch) | |
tree | 09cfb3262ed217a89eafe216959b8cfbcebef5b7 /drivers/target | |
parent | 286c9b2c933a787cb43761e86d295f867d2790c0 (diff) | |
download | linux-3.10-3eee84071548d0d279d8f630404a5b16d45b42f2.tar.gz linux-3.10-3eee84071548d0d279d8f630404a5b16d45b42f2.tar.bz2 linux-3.10-3eee84071548d0d279d8f630404a5b16d45b42f2.zip |
iscsi-target: Re-add chunk from backport of upstream 79d59d08082d to 3.10
Commit d5c55fa31a29, the backport of upstream 79d59d08082d
("iscsi-target: Fix wrong buffer / buffer overrun in
iscsi_change_param_value()") left out applying one chunk of the fix in
iscsi_login_non_zero_tsih_s2(). Add the missing chunk.
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_login.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index 0d6c3dd2567..e14e105acff 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c @@ -597,13 +597,8 @@ static int iscsi_login_non_zero_tsih_s2( * * In our case, we have already located the struct iscsi_tiqn at this point. */ - memset(buf, 0, 32); - sprintf(buf, "TargetPortalGroupTag=%hu", ISCSI_TPG_S(sess)->tpgt); - if (iscsi_change_param_value(buf, conn->param_list, 0) < 0) { - iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR, - ISCSI_LOGIN_STATUS_NO_RESOURCES); + if (iscsi_change_param_sprintf(conn, "TargetPortalGroupTag=%hu", sess->tpg->tpgt)) return -1; - } return iscsi_login_disable_FIM_keys(conn->param_list, conn); } |