target/iscsi: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Includes a fix for correcting an on-stack timer usage. Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org> Cc: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Jiang Yi <jiangyilism@gmail.com> Cc: Varun Prakash <varun@chelsio.com> Cc: linux-scsi@vger.kernel.org Cc: target-devel@vger.kernel.org Reviewed-and-Tested-by: Bart Van Assche <Bart.VanAssche@wdc.com> Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
@@ -372,8 +372,7 @@ struct iscsi_np *iscsit_add_np(
|
||||
init_completion(&np->np_restart_comp);
|
||||
INIT_LIST_HEAD(&np->np_list);
|
||||
|
||||
setup_timer(&np->np_login_timer, iscsi_handle_login_thread_timeout,
|
||||
(unsigned long)np);
|
||||
timer_setup(&np->np_login_timer, iscsi_handle_login_thread_timeout, 0);
|
||||
|
||||
ret = iscsi_target_setup_login_socket(np, sockaddr);
|
||||
if (ret != 0) {
|
||||
|
Reference in New Issue
Block a user