Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755411AbXJ2M2e (ORCPT ); Mon, 29 Oct 2007 08:28:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753429AbXJ2M2T (ORCPT ); Mon, 29 Oct 2007 08:28:19 -0400 Received: from mx0.towertech.it ([213.215.222.73]:60867 "HELO mx0.towertech.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752872AbXJ2M2S (ORCPT ); Mon, 29 Oct 2007 08:28:18 -0400 Date: Mon, 29 Oct 2007 13:20:27 +0100 From: Alessandro Zummo To: Jiri Kosina Cc: Andrew Morton , Peter Zijlstra , Gabriel C , Linux Kernel Mailing List , rtc-linux@googlegroups.com Subject: Re: BUG: lock held when returning to user space Message-ID: <20071029132027.45b51ff8@i1501.lan.towertech.it> In-Reply-To: References: <472348F6.6050100@googlemail.com> <1193498921.5648.68.camel@lappy> <20071027084646.434ccb4f.akpm@linux-foundation.org> Organization: Tower Technologies X-Mailer: Sylpheed Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1008 Lines: 38 On Sun, 28 Oct 2007 12:12:19 +0100 (CET) Jiri Kosina 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 > > 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 Acked-by: Alessandro Zummo -- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/