Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Oct 2015 12:34:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-fs@FreeBSD.org
Subject:   [Bug 172942] [smbfs] Unmounting a smb mount when the server became unavailable causes kernel panic
Message-ID:  <bug-172942-3630-ZMtsIsPacx@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-172942-3630@https.bugs.freebsd.org/bugzilla/>
References:  <bug-172942-3630@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=172942

Rick Macklem <rmacklem@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|freebsd-fs@FreeBSD.org      |rmacklem@FreeBSD.org

--- Comment #3 from Rick Macklem <rmacklem@FreeBSD.org> ---
I believe there is a race caused by smb_iod_destroy() where it
calls sbm_iod_request() to shutdown the connection/iod thread.
smb_iod_request() does an msleep(..PDROP..), which can return
as soon as smb_iod_main() does the wakeup(). After returning
from the msleep(), it returns to smb_iod_destroy(), which then
destroys the mutexes and frees the iod structure.

Unfortunately, smb_iod_main() is not done with the mutexes when
it calls wakeup().

I believe this patch fixes the problem by moving the code that
destroys the mutexs and frees the iod structure to the end of
the smb_iod thread.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-172942-3630-ZMtsIsPacx>