Re: BUG: lock held when returning to user space

From: Alessandro Zummo
Date: Mon Oct 29 2007 - 08:28:37 EST


On Sun, 28 Oct 2007 12:12:19 +0100 (CET)
Jiri Kosina <jikos@xxxxxxxx> wrote:

> On Sat, 27 Oct 2007, Andrew Morton wrote:
>
> > It's a fairly daft thing to do. I think it'd be saner to teach rtc about
> > test_and_set_bit() personally..
>
>
> From: Jiri Kosina <jkosina@xxxxxxx>
>
> RTC: convert mutex to bitfield
>
> RTC code is using mutex to assure exclusive access to /dev/rtc.
> This is however wrong usage, as it leaves the mutex locked when
> returning into userspace, which is unacceptable.
>
> Convert rtc->char_lock into bit operation.
>
> Signed-off-by: Jiri Kosina <jkosina@xxxxxxx>


Acked-by: Alessandro Zummo <a.zummo@xxxxxxxxxxxx>

--

Best regards,

Alessandro Zummo,
Tower Technologies - Torino, Italy

http://www.towertech.it

-
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/