From 88c10719b37fbb198caa2923d45715f6d98f7e87 Mon Sep 17 00:00:00 2001 From: Gordon Ross Date: Sat, 17 Sep 2016 15:39:19 -0400 Subject: [PATCH] 7389 smbd: hung threads when session is terminated or disconnected Reviewed by: Matt Barden Reviewed by: Yuri Pankov Reviewed by: Evan Layton Reviewed by: Vitaliy Gusev --- usr/src/uts/common/fs/smbsrv/smb_net.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/usr/src/uts/common/fs/smbsrv/smb_net.c b/usr/src/uts/common/fs/smbsrv/smb_net.c index bdcf2e0482..9d069f9f9e 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_net.c +++ b/usr/src/uts/common/fs/smbsrv/smb_net.c @@ -22,7 +22,7 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * - * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ #include @@ -166,24 +166,10 @@ smb_net_send_uio(smb_session_t *s, struct uio *uio) mutex_enter(&txl->tl_mutex); while (txl->tl_active) cv_wait(&txl->tl_wait_cv, &txl->tl_mutex); - - /* - * Did the connection close while we waited? - */ - switch (s->s_state) { - case SMB_SESSION_STATE_DISCONNECTED: - case SMB_SESSION_STATE_TERMINATED: - rc = ENOTCONN; - break; - default: - txl->tl_active = B_TRUE; - break; - } + txl->tl_active = B_TRUE; mutex_exit(&txl->tl_mutex); DTRACE_PROBE1(send__wait__done, struct smb_session_t *, s); - if (rc != 0) - return (rc); /* * OK, try to send. -- 2.11.4.GIT