lkml.org 
[lkml]   [2005]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectShould activate_page()/__set_page_dirty_buffers() use _irqsave locking?
From
Date
I've been experimenting with oprofile on an arm system without a PMU.
Whenever I enable callgraphing I see a BUG from run_posix_cpu_timers()
due to irqs being enabled when they should be disabled.

Tracing this back shows interrupts are enabled after the arm backtrace
code completes. Further tracing reveals its the call to
check_user_page_readable() (within an interrupt) that is causing the
problem.

check_user_page_readable() can potentially result in calls to
activate_page() (mm/swap.c) and __set_page_dirty_buffers()
(fs/buffer.c). Both functions use *_lock_irq()/*_unlock_irq rather than
the *_lock_irqsave/*_unlock_irqrestore counterparts.

Switching them to use the save/restore locks makes everything work. Is
there a reason for not using these here? Would such a patch be accepted?

Both the arm and i386 backtrace code would seem to be vulnerable to this
problem.

Richard

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

\
 
 \ /
  Last update: 2005-07-26 13:03    [W:0.076 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site