[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <m2sje7hv33.fsf@firstfloor.org>
Date: Thu, 07 Jun 2012 10:48:16 -0700
From: Andi Kleen <andi@...stfloor.org>
To: stefani@...bold.net
Cc: linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
oneukum@...e.de, alan@...rguk.ukuu.org.uk,
linux-usb@...r.kernel.org
Subject: Re: [PATCH 10/11] Introduce single user mode
stefani@...bold.net 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@...ux.intel.com -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists