Re: lockmgr: thread 0xc21e2780 unlocking unheld lock

From: SANETO Takanori <sanewo_at_ba2.so-net.ne.jp>
Date: Sat, 15 Jul 2006 12:19:22 +0900
I think that "==" should be "!=" in the patched code.

John Baldwin wrote:
> On Tuesday 11 July 2006 09:29, Jiawei Ye wrote:
>> I was doing "sudo mount_smbfs //user_at_server/share /mnt" when the
>> following msg appeared. smbfs.ko was not loaded.
> 
> Does building with INVARIANTS fix it?  If so, try this patch (it looks
> like it has been broken since 1.1 of the smbfs code):
> 
> Index: smb_conn.c
> ===================================================================
> RCS file: /usr/cvs/src/sys/netsmb/smb_conn.c,v
> retrieving revision 1.16
> diff -u -r1.16 smb_conn.c
> --- smb_conn.c	31 Oct 2005 15:41:27 -0000	1.16
> +++ smb_conn.c	11 Jul 2006 15:01:10 -0000
> _at__at_ -233,7 +233,8 _at__at_
>  	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
> 
Received on Sat Jul 15 2006 - 01:20:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:58 UTC