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


B and H Foto and Electronics Corp.

[Linux Media]     [Video for Linux]     [Linux Input]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]     [More Archives]

Add to Google Powered by Linux