mirror of
https://github.com/opnsense/src.git
synced 2026-05-04 17:05:14 -04:00
Always lock the lockmgr lock when creating an smb connection object rather
than only locking it if INVARIANTS is enabled. All the callers expect smb_co_init() to return with the lock held. Tested by: "Jiawei Ye" <leafy7382 at gmail>
This commit is contained in:
parent
c67bd97df8
commit
74ed4a9a17
1 changed files with 2 additions and 1 deletions
|
|
@ -233,7 +233,8 @@ smb_co_init(struct smb_connobj *cp, int level, char *objname, struct thread *td)
|
|||
lockinit(&cp->co_lock, PZERO, objname, 0, 0);
|
||||
cp->co_level = level;
|
||||
cp->co_usecount = 1;
|
||||
KASSERT(smb_co_lock(cp, LK_EXCLUSIVE, td) == 0, ("smb_co_init: lock failed"));
|
||||
if (smb_co_lock(cp, LK_EXCLUSIVE, td) != 0)
|
||||
panic("smb_co_init: lock failed");
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Reference in a new issue