login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
27
Re: BUG: lock held when returning to user space
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Andrew Morton
Subject:
Re: BUG: lock held when returning to user space
Date: Saturday, October 27, 2007 - 8:46 am
On Sat, 27 Oct 2007 17:28:41 +0200 Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
quoted text
> > On Sat, 2007-10-27 at 17:12 +0200, Jiri Kosina wrote: > > On Sat, 27 Oct 2007, Gabriel C wrote: > > > > > I found that today in dmesg after booting current git ( > > > ec3b67c11df42362ccda81261d62829042f223f0 ) : > > > ... > > > [ 592.752777] > > > [ 592.752781] ================================================ > > > [ 592.753478] [ BUG: lock held when returning to user space! ] > > > [ 592.753880] ------------------------------------------------ > > > [ 592.754262] hwclock/1452 is leaving the kernel with locks still held! > > > [ 592.754655] 1 lock held by hwclock/1452: > > > [ 592.755007] #0: (&rtc->char_lock){--..}, at: [<c02a7ebb>] rtc_dev_open+0x2e/0x7e > > > > Yes, this is because rtc keeps a char_lock mutex locked as long as the > > device is open, to avoid concurrent accessess. > > > > It could be easily substituted by some counting -- setting and clearing > > bit in struct rtc_device instead of using char_lock, but doing this just > > to shut the lockdep off is questionable imho. > > > > Peter, what is the preferred way to annotate these kinds of locking for > > lockdep to express that it is intended? > > Not sure, I'd not thought that anyone would actually want to do this. > I'm also not sure how I stand on this, I'd prefer to say: don't do this! > > I think, in this case, the lock is associated with a kernel object that > is properly cleaned up if the holding tasks gets a SIGKILL. But in > general I'd like to see this kind of thing go away. > > Now I could probably come up with an annotation to hide it, but what do > other people think, Ingo, Linus, Andrew, do we want to keep kernel locks > held over userspace? >
It's a fairly daft thing to do. I think it'd be saner to teach rtc about test_and_set_bit() personally.. -
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
BUG: lock held when returning to user space
, Gabriel C
, (Sat Oct 27, 7:19 am)
Re: BUG: lock held when returning to user space
, Jiri Kosina
, (Sat Oct 27, 8:12 am)
Re: BUG: lock held when returning to user space
, Peter Zijlstra
, (Sat Oct 27, 8:28 am)
Re: BUG: lock held when returning to user space
, Andrew Morton
, (Sat Oct 27, 8:46 am)
Re: BUG: lock held when returning to user space
, Arjan van de Ven
, (Sat Oct 27, 8:47 am)
Re: BUG: lock held when returning to user space
, Peter Zijlstra
, (Sat Oct 27, 9:09 am)
Re: BUG: lock held when returning to user space
, Linus Torvalds
, (Sat Oct 27, 9:35 am)
Re: BUG: lock held when returning to user space
, Arjan van de Ven
, (Sat Oct 27, 10:05 am)
Re: BUG: lock held when returning to user space
, Jiri Kosina
, (Sat Oct 27, 3:47 pm)
Re: BUG: lock held when returning to user space
, Jiri Kosina
, (Sun Oct 28, 4:12 am)
Re: [rtc-linux] Re: BUG: lock held when returning to user ...
, Alessandro Zummo
, (Mon Oct 29, 5:20 am)
Re: BUG: lock held when returning to user space
, Alessandro Zummo
, (Mon Oct 29, 5:20 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Francis Moreau
Re: Disk geometry from /sys
Rafael J. Wysocki
[Bug #11407] suspend: unable to handle kernel paging request
Christoph Lameter
Re: [bug] SLUB + mm/slab.c boot crash in -rc9
Jeremy Fitzhardinge
Re: [2.6.25] compat VDSO option not disabling
Rafael J. Wysocki
[Bug #11551] Semi-repeatable hard lockup on 2.6.27-rc6
git
:
Pat Thoyts
[PATCH] git-gui: use themed tk widgets with Tk 8.5
Tait
Re: [PATCH] Replace hard-coded path with one from <paths.h>
Frans Pop
'git gc --aggressive' effectively unusable
Stephan Beyer
Re: git sequencer prototype
Lynn Lin
Re: clearcase migration to git
linux-netdev
:
William Allen Simpson
[net-next-2.6 PATCH v8 0/7] TCPCT part 1: cookie option exchange
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
David Miller
Re: [PATCH] IPv6: preferred lifetime of address not getting updated
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
Mark McLoughlin
Re: [PATCH 2/3] virtio: fix delayed xmit of packet and freeing of old packets.
git-commits-head
:
Linux Kernel Mailing List
.gitignore: ignore *.lzo files
Linux Kernel Mailing List
init: Open /dev/console from rootfs
Linux Kernel Mailing List
imxfb: Fix margin settings
Linux Kernel Mailing List
udp: fix for unicast RX path optimization
Linux Kernel Mailing List
V4L/DVB (10826): cx88: Add IR support to pcHDTV HD3000 & HD5500
openbsd-misc
:
Robert
disklabel - cylinder rounding
nixlists
Re: Which laptops do the developers use?
admin
Drive a 2009 car from R799p/m
L. V. Lammert
OT, .. but has anyone seen a crontab editor
Darrin Chandler
Re: That whole "Linux stealing our code" thing
Colocation donated by:
Syndicate