How is supposed to be protected the units list?

Matthew Jacob mj at feral.com
Tue Mar 30 14:34:23 UTC 2010


I was distracted yesterday so didn't finish my testing.

There are still lots of issues that can occur. I'm still forming some 
thoughts on this, but part of the problem is that there are things going 
on with a periph that make this difficult. Pieces of it can change or be 
changed- even under a lock- but the code surrounding the lock isn't 
aware that it can change *between* the lock. For example, I think that 
cam_periph alloc can have two different arrivals of something which 
could be for the same periph can end up with two different periph 
structures on the list with different unit numbers that point to the 
same bus. It doesn't matter that there were locks to provide some 
stability because the locks were dropped in between.

> The lock recursion is going to happen because of the necessary
> refcount acquisition as Matt pointed out?
> Or there is another recursion?
> In the former case, the global lock will help because you may just
> acquire it, refcount the periph, cache them and run lockless.
> You can't do this with xpt_lock_bus because of the recursion in
> cam_periph_acquire.
>
> So we want to live this unprotected and just live with this bug?
>
> Attilio
>
>
>    



More information about the freebsd-scsi mailing list