diff options
author | jhb <jhb@FreeBSD.org> | 2006-07-17 16:12:59 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-07-17 16:12:59 +0000 |
commit | 5d507389114fdef17c1601dac3c0e68c44ea1541 (patch) | |
tree | 8253951ffab6df40511d80ac14f0433897e86de8 /sys/netsmb | |
parent | 6cdb8f6653a702d5226885d28a3e99c1d2dd4516 (diff) | |
download | FreeBSD-src-5d507389114fdef17c1601dac3c0e68c44ea1541.zip FreeBSD-src-5d507389114fdef17c1601dac3c0e68c44ea1541.tar.gz |
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>
Diffstat (limited to 'sys/netsmb')
-rw-r--r-- | sys/netsmb/smb_conn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netsmb/smb_conn.c b/sys/netsmb/smb_conn.c index 0791249..038402a 100644 --- a/sys/netsmb/smb_conn.c +++ b/sys/netsmb/smb_conn.c @@ -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 |