From: Roland Dreier Date: Mon, 30 Jun 2014 14:02:20 +0000 (-0700) Subject: iscsi-target: Re-add chunk from backport of upstream 79d59d08082d to 3.10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3eee84071548d0d279d8f630404a5b16d45b42f2;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index 0d6c3dd25679..e14e105acff8 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); }