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

From: Andi Kleen
Date: Thu Jun 07 2012 - 13:48:23 EST


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-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/