]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC: r291035
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 2 Dec 2015 21:56:01 +0000 (21:56 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 2 Dec 2015 21:56:01 +0000 (21:56 +0000)
commit1ca7714e84e946f1c3a41cca49d51a3554c7c6a8
treec79950fe6e22cbd2ae212e5f9d5d3d4e5902358a
parent32909e0ee2f6f1e97966d4ec735f45db3569d5ed
MFC: r291035
The problem report was for a crash that happened when smbfs was
trying to do a mount. Given the backtrace,
it appears that the crash occurred when smb_vc_create() failed and then
called smb_vc_put() with vcp->vc_iod == NULL. smb_vc_put() subsequently
called smb_vc_disconnect() with vcp->vc_iod == NULL, causing the crash.
This patch adds a check for vcp->vc_iod != NULL in smb_vc_disconnect() to
avoid the crash. It also fixes the case in smb_vc_create() where
kproc_create() fails so that it destroys the mutexes and sets
vcp->vc_iod == NULL before free()'ing the iod structure.

git-svn-id: svn://svn.freebsd.org/base/stable/9@291656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netsmb/smb_conn.c
sys/netsmb/smb_iod.c