On Fri, Apr 20, 2012 at 09:37:00AM +0200, Manuel Bouyer wrote: > > we've never had autoconfig run with the kernel lock AFAICT, so this > > assumption has never been true. > > So this is a bug. The contract was really that spl-locked drivers would > continue to work as is when fine-grained locking was introduced. > I don't think it's reasonable to require every (but the few > already MP-safe) drivers to take KERNEL_LOCK in their attach > routine.
So autoconf should check and take the kernel lock before calling the attach routine of a non-MPSAFE driver. If it doesn't already do this, it's wrong. Meanwhile, since scsipi is not MPSAFE, whoever is calling into scsipi without taking the kernel lock first is wrong, so the change at the beginning of this thread should be reverted. (Furthermore, scsipi is itself wrong. It is a core component; it should be MPSAFE.) -- David A. Holland dholl...@netbsd.org