Re: Panic on -CURRENT after LDT changes

From: Attilio Rao <attilio_at_FreeBSD.org>
Date: Mon, 28 May 2007 23:06:24 +0200
Tor Egge wrote:
> 
> Finally, I found that i386_ldt_grow() called smp_rendezvous() without
> temporarily unlocking dt_lock.  That caused a deadlock.  Adding a temporary
> unlock of dt_lock seems to solve the problem for me.

Effectively, there is the need to release the dt_lock before to call 
smp_rendezvous() beacause other threads running on other CPUs will 
contest on this lock and it will cause a deadlock (since their 
curthreads don't hold the lock).
I think that mantaining the current locking requirements for 
i386_ldt_grow() is still good, since, for how it is used, this is the 
lighter approach. I will add release/unrelease around smp_rendezvous() too.

Thanks for the catch,
Attilio
Received on Mon May 28 2007 - 19:06:38 UTC

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