Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322911
b: refs/heads/master
c: 13b5533
h: refs/heads/master
i:
  322909: 68b1c46
  322907: 0546c01
  322903: ecdeebf
  322895: e62ad5b
  322879: ab2a7db
v: v3
  • Loading branch information
Benjamin Wang authored and Nicholas Bellinger committed Aug 27, 2012
1 parent efc688e commit 63e4645
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c054ba63ad47ef244cfcfa1cea38134620a5bae
refs/heads/master: 13b5533a38b1eec9d61a07711dc075f03ae47a36
11 changes: 10 additions & 1 deletion trunk/drivers/target/iscsi/iscsi_target_login.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ static int iscsi_login_zero_tsih_s1(
{
struct iscsi_session *sess = NULL;
struct iscsi_login_req *pdu = (struct iscsi_login_req *)buf;
int ret;

sess = kzalloc(sizeof(struct iscsi_session), GFP_KERNEL);
if (!sess) {
Expand Down Expand Up @@ -257,9 +258,17 @@ static int iscsi_login_zero_tsih_s1(
return -ENOMEM;
}
spin_lock(&sess_idr_lock);
idr_get_new(&sess_idr, NULL, &sess->session_index);
ret = idr_get_new(&sess_idr, NULL, &sess->session_index);
spin_unlock(&sess_idr_lock);

if (ret < 0) {
pr_err("idr_get_new() for sess_idr failed\n");
iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
ISCSI_LOGIN_STATUS_NO_RESOURCES);
kfree(sess);
return -ENOMEM;
}

sess->creation_time = get_jiffies_64();
spin_lock_init(&sess->session_stats_lock);
/*
Expand Down

0 comments on commit 63e4645

Please sign in to comment.