Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/scsipi



On Fri, Apr 20, 2012 at 07:46:35AM +0000, David Holland wrote:
> 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.

I agree :)

> 
> 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.

I also agree, in light of this discussion (I though that KERNEL_LOCK
was not held while cold on purpose, but it seems that the issue is at
another level, and more annoying).

But I find it acceptable as an interim solution, it at last
allows attaching scsi drivers that are probed at boot.

> 
> (Furthermore, scsipi is itself wrong. It is a core component; it
> should be MPSAFE.)

I also agree. So should be ata, if_ethersubr, etc ...
that's a lot of work.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index