![Nicholas Bellinger](/assets/img/avatar_default.png)
This patch fixes a regression introduced with the following commit
in v4.0-rc1 code, where a iscsit_start_kthreads() failure triggers
a NULL pointer dereference OOPs:
commit 88dcd2dab5
Author: Nicholas Bellinger <nab@linux-iscsi.org>
Date: Thu Feb 26 22:19:15 2015 -0800
iscsi-target: Convert iscsi_thread_set usage to kthread.h
To address this bug, move iscsit_start_kthreads() immediately
preceeding the transmit of last login response, before signaling
a successful transition into full-feature-phase within existing
iscsi_target_do_tx_login_io() logic.
This ensures that no target-side resource allocation failures can
occur after the final login response has been successfully sent.
Also, it adds a iscsi_conn->rx_login_comp to allow the RX thread
to sleep to prevent other socket related failures until the final
iscsi_post_login_handler() call is able to complete.
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: <stable@vger.kernel.org> # v3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
22 lines
1 KiB
C
22 lines
1 KiB
C
#ifndef ISCSI_TARGET_LOGIN_H
|
|
#define ISCSI_TARGET_LOGIN_H
|
|
|
|
extern int iscsi_login_setup_crypto(struct iscsi_conn *);
|
|
extern int iscsi_check_for_session_reinstatement(struct iscsi_conn *);
|
|
extern int iscsi_login_post_auth_non_zero_tsih(struct iscsi_conn *, u16, u32);
|
|
extern int iscsit_setup_np(struct iscsi_np *,
|
|
struct __kernel_sockaddr_storage *);
|
|
extern int iscsi_target_setup_login_socket(struct iscsi_np *,
|
|
struct __kernel_sockaddr_storage *);
|
|
extern int iscsit_accept_np(struct iscsi_np *, struct iscsi_conn *);
|
|
extern int iscsit_get_login_rx(struct iscsi_conn *, struct iscsi_login *);
|
|
extern int iscsit_put_login_tx(struct iscsi_conn *, struct iscsi_login *, u32);
|
|
extern void iscsit_free_conn(struct iscsi_np *, struct iscsi_conn *);
|
|
extern int iscsit_start_kthreads(struct iscsi_conn *);
|
|
extern void iscsi_post_login_handler(struct iscsi_np *, struct iscsi_conn *, u8);
|
|
extern void iscsi_target_login_sess_out(struct iscsi_conn *, struct iscsi_np *,
|
|
bool, bool);
|
|
extern int iscsi_target_login_thread(void *);
|
|
|
|
#endif /*** ISCSI_TARGET_LOGIN_H ***/
|