On 16-Aug-01 Michael Lucas wrote:
> [cc's trimmed]
> 
> John,
> 
> Thanks for the suggestion, I appreciate it.  I did as you suggested
> (diff below).
> 
> It paniced again, but this time savecore said "dump time is unreasonable."
> 
> The short panic message was:
> 
> panicstr: bremfree: bp 0xcc2a1ae4 not locked
> 
> Looks like the same thing to me, sorry.  Any other suggestions?
> 
> magpire/sys/kern;diff subr_witness.c subr_witness.c-dist 
> 392a393
>>       mtx_lock(&all_mtx);
> 395d395
> <       mtx_lock(&all_mtx);
> magpire/sys/kern;diff -c subr_witness.c subr_witness.c-dist
> *** subr_witness.c      Thu Aug 16 16:16:06 2001
> --- subr_witness.c-dist Thu Aug 16 16:15:20 2001
> ***************
> *** 390,398 ****
>                 mtx_unlock_spin(&w_mtx);
>         }
>   
>         lock_cur_cnt--;
>         STAILQ_REMOVE(&all_locks, lock, lock_object, lo_list);
> -       mtx_lock(&all_mtx);
>         lock->lo_flags &= ~LO_INITIALIZED;
>         mtx_unlock(&all_mtx);
>   }
> --- 390,398 ----
>                 mtx_unlock_spin(&w_mtx);
>         }
>   
> +       mtx_lock(&all_mtx);
>         lock_cur_cnt--;
>         STAILQ_REMOVE(&all_locks, lock, lock_object, lo_list);
>         lock->lo_flags &= ~LO_INITIALIZED;
>         mtx_unlock(&all_mtx);
>   }
> magpire/sys/kern;

No, no. :)  Move the mtx_lock of all_mtx _up_ above the earlier check against
LO_INITALIZED.  The one that does something liek this:

        if ((lock->lo_flags & LO_INITIALIZED) == 0)
                panic();

-- 

John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to