From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@infradead.org>,
linux-kernel@vger.kernel.org,
Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: [kerneloops] regression in 2.6.27 wrt "lock_page" and the "hwclock" program
Date: Sun, 5 Oct 2008 11:18:02 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.00.0810051114480.3208@nehalem.linux-foundation.org> (raw)
In-Reply-To: <20081004215225.2444d54b.akpm@linux-foundation.org>
On Sat, 4 Oct 2008, Andrew Morton wrote:
> > Pid: 9591, comm: hwclock Tainted: G W 2.6.27-0.372.rc8.fc10.i686 #1
> > [<c0427a53>] __might_sleep+0xd1/0xd6
> > [<c0479a8b>] lock_page+0x1a/0x34
> > [<c0479cfa>] find_lock_page+0x23/0x48
> > [<c047a215>] filemap_fault+0x9b/0x330
> > [<c0486493>] __do_fault+0x40/0x2e6
> > [<c0487d63>] handle_mm_fault+0x2ec/0x6d2
> > [<c06e8260>] do_page_fault+0x2e5/0x693
>
> Looks like `hwclock' disabled interrupts in userspace with sys_iopl()?
We probably should enable interrupts in the page fault code. We already do
#ifdef CONFIG_X86_32
/* It's safe to allow irq's after cr2 has been saved and the vmalloc
fault has been handled. */
if (regs->flags & (X86_EFLAGS_IF | X86_VM_MASK))
local_irq_enable();
/*
* If we're in an interrupt, have no user context or are running in an
* atomic region then we must not take the fault.
*/
if (in_atomic() || !mm)
goto bad_area_nosemaphore;
#endif
...
so we have code to do so, it's just that we don't do it if the page fault
happened in an interrupt. But that's for the _kernel_ having interrupts
disabled and us needing to fix up the vmalloc area lazily (do we ever even
do that any more.. I dunno).
So we could easily add a check for 'user_space_vm(regs)' instead of
checking the VM_MASK, and fix it that way. Hmm?
Linus
prev parent reply other threads:[~2008-10-05 18:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-05 0:44 [kerneloops] regression in 2.6.27 wrt "lock_page" and the "hwclock" program Arjan van de Ven
2008-10-05 4:52 ` Andrew Morton
2008-10-05 15:11 ` Arjan van de Ven
2008-10-05 17:27 ` Andrew Morton
2008-10-05 17:38 ` Arjan van de Ven
2008-10-12 20:00 ` Karel Zak
2008-10-12 20:16 ` Linus Torvalds
2008-10-13 14:55 ` Arjan van de Ven
2008-10-14 21:04 ` Karel Zak
2008-10-13 15:26 ` Ingo Molnar
2008-10-13 15:40 ` Alan Cox
2008-10-13 15:44 ` Linus Torvalds
2008-10-13 16:02 ` Ingo Molnar
2008-10-13 16:08 ` Linus Torvalds
2008-10-13 16:21 ` Ingo Molnar
2008-10-12 19:46 ` Karel Zak
2008-10-05 18:18 ` Linus Torvalds [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0810051114480.3208@nehalem.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox