|
@@ -559,9 +559,15 @@ static void iscsi_target_login_drop(struct iscsi_conn *conn, struct iscsi_login
|
|
|
iscsi_target_login_sess_out(conn, np, zero_tsih, true);
|
|
|
}
|
|
|
|
|
|
-static void iscsi_target_login_timeout(unsigned long data)
|
|
|
+struct conn_timeout {
|
|
|
+ struct timer_list timer;
|
|
|
+ struct iscsi_conn *conn;
|
|
|
+};
|
|
|
+
|
|
|
+static void iscsi_target_login_timeout(struct timer_list *t)
|
|
|
{
|
|
|
- struct iscsi_conn *conn = (struct iscsi_conn *)data;
|
|
|
+ struct conn_timeout *timeout = from_timer(timeout, t, timer);
|
|
|
+ struct iscsi_conn *conn = timeout->conn;
|
|
|
|
|
|
pr_debug("Entering iscsi_target_login_timeout >>>>>>>>>>>>>>>>>>>\n");
|
|
|
|
|
@@ -580,7 +586,7 @@ static void iscsi_target_do_login_rx(struct work_struct *work)
|
|
|
struct iscsi_np *np = login->np;
|
|
|
struct iscsi_portal_group *tpg = conn->tpg;
|
|
|
struct iscsi_tpg_np *tpg_np = conn->tpg_np;
|
|
|
- struct timer_list login_timer;
|
|
|
+ struct conn_timeout timeout;
|
|
|
int rc, zero_tsih = login->zero_tsih;
|
|
|
bool state;
|
|
|
|
|
@@ -618,13 +624,14 @@ static void iscsi_target_do_login_rx(struct work_struct *work)
|
|
|
conn->login_kworker = current;
|
|
|
allow_signal(SIGINT);
|
|
|
|
|
|
- setup_timer_on_stack(&login_timer, iscsi_target_login_timeout,
|
|
|
- (unsigned long)conn);
|
|
|
- mod_timer(&login_timer, jiffies + TA_LOGIN_TIMEOUT * HZ);
|
|
|
- pr_debug("Starting login_timer for %s/%d\n", current->comm, current->pid);
|
|
|
+ timeout.conn = conn;
|
|
|
+ timer_setup_on_stack(&timeout.timer, iscsi_target_login_timeout, 0);
|
|
|
+ mod_timer(&timeout.timer, jiffies + TA_LOGIN_TIMEOUT * HZ);
|
|
|
+ pr_debug("Starting login timer for %s/%d\n", current->comm, current->pid);
|
|
|
|
|
|
rc = conn->conn_transport->iscsit_get_login_rx(conn, login);
|
|
|
- del_timer_sync(&login_timer);
|
|
|
+ del_timer_sync(&timeout.timer);
|
|
|
+ destroy_timer_on_stack(&timeout.timer);
|
|
|
flush_signals(current);
|
|
|
conn->login_kworker = NULL;
|
|
|
|