Re: [PATCH 10/11] Introduce single user mode

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

 



stefani@xxxxxxxxxxx writes:
>  	}
>  
> +	if (dev->in_use) {
> +		retval = -EBUSY;
> +		goto exit;
> +	}

This plus setting the flag has to be inside the mutex, otherwise you
have an obvious race.

-Andi

-- 
ak@xxxxxxxxxxxxxxx -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux