Hello, David. On Sat, Nov 17, 2012 at 12:45:47PM +0100, David Herrmann wrote: > We need to check for name-collisions during cuse-device registration. To > avoid race-conditions, this needs to be protected during the whole device > registration. Therefore, replace the spinlocks by mutexes first so we can > safely extend the locked regions to include more expensive or sleeping > code paths. > > Signed-off-by: David Herrmann <[email protected]> > @@ -114,14 +113,18 @@ static int cuse_open(struct inode *inode, struct file > *file) > int rc; > > /* look up and get the connection */ > - spin_lock(&cuse_lock); > + rc = mutex_lock_interruptible(&cuse_lock);
Well, the above can't hurt but it doesn't help anything either given the narrow scope of the lock. Eh well, I guess it's okay either way. Acked-by: Tejun Heo <[email protected]> Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

