Re: [rtc-linux] [PATCH] rtc: remove BKL for ioctl()

From: Alessandro Zummo
Date: Wed Jun 25 2008 - 04:58:08 EST


On Sun, 22 Jun 2008 19:55:42 -0700
David Brownell <david-b@xxxxxxxxxxx> wrote:

> Remove implicit use of BKL in ioctl() from the RTC framework.
>
> Instead, the rtc->ops_lock is used. That's the same lock that already
> protects the RTC operations when they're issued through the exported
> rtc_*() calls in drivers/rtc/interface.c ... making this a bugfix, not
> just a cleanup, since both ioctl calls and set_alarm() need to update
> IRQ enable flags and that implies a common lock (which RTC drivers as
> a rule do not provide on their own).
>
> A new comment at the declaration of "struct rtc_class_ops" summarizes
> current locking rules. It's not clear to me that the exceptions listed
> there should exist ... if not, those are pre-existing problems which can
> be fixed in a patch that doesn't relate to BKL removal.
>
> Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>


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/