]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
target: Check idr_get_new return value in iscsi_login_zero_tsih_s1
authorBenjamin Wang <cpwang2009@gmail.com>
Sun, 26 Aug 2012 10:04:10 +0000 (18:04 +0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 27 Aug 2012 06:27:08 +0000 (23:27 -0700)
commit13b5533a38b1eec9d61a07711dc075f03ae47a36
tree9b38e6c30109c74689dfca14f123eb71ff2e7f1e
parent4c054ba63ad47ef244cfcfa1cea38134620a5bae
target: Check idr_get_new return value in iscsi_login_zero_tsih_s1

This patch updates iscsi_login_zero_tsih_s1() usage for generating
iscsi_session->session_index to properly check the return value from
idr_get_new(), and reject the iSCSI login attempt with exception
status ISCSI_LOGIN_STATUS_NO_RESOURCES in the event of a failure.

Signed-off-by: Benjamin Wang <cpwang2009@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_login.c