* [PATCH] Fix avr32 TIF atomicity in do_debug_priv
@ 2007-03-09 3:21 Mathieu Desnoyers
2007-03-09 7:35 ` Haavard Skinnemoen
0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Desnoyers @ 2007-03-09 3:21 UTC (permalink / raw)
To: akpm, mbligh, linux-kernel, hskinnemoen
Fix avr32 TIF atomicity in do_debug_priv
avr32 updates the thread flags 1 - non atomically and 2 - with the wrong value
(for TIF_SINGLE_STEP) in this function.
It applies to 2.6.20.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
--- a/arch/avr32/kernel/ptrace.c
+++ b/arch/avr32/kernel/ptrace.c
@@ -306,14 +306,12 @@ asmlinkage void do_debug_priv(struct pt_regs *regs)
if (likely(ds & DS_SSS)) {
extern void itlb_miss(void);
extern void tlb_miss_common(void);
- struct thread_info *ti;
dc = __mfdr(DBGREG_DC);
dc &= ~DC_SS;
__mtdr(DBGREG_DC, dc);
- ti = current_thread_info();
- ti->flags |= _TIF_BREAKPOINT;
+ set_tsk_thread_flag(tsk, TIF_BREAKPOINT);
/* The TLB miss handlers don't check thread flags */
if ((regs->pc >= (unsigned long)&itlb_miss)
@@ -328,7 +326,7 @@ asmlinkage void do_debug_priv(struct pt_regs *regs)
* single step.
*/
if ((regs->sr & MODE_MASK) != MODE_SUPERVISOR)
- ti->flags |= TIF_SINGLE_STEP;
+ set_tsk_thread_flag(tsk, TIF_SINGLE_STEP);
} else {
panic("Unable to handle debug trap at pc = %08lx\n",
regs->pc);
--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix avr32 TIF atomicity in do_debug_priv
2007-03-09 3:21 [PATCH] Fix avr32 TIF atomicity in do_debug_priv Mathieu Desnoyers
@ 2007-03-09 7:35 ` Haavard Skinnemoen
0 siblings, 0 replies; 2+ messages in thread
From: Haavard Skinnemoen @ 2007-03-09 7:35 UTC (permalink / raw)
To: Mathieu Desnoyers; +Cc: akpm, mbligh, linux-kernel
On Thu, 8 Mar 2007 22:21:37 -0500
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:
> Fix avr32 TIF atomicity in do_debug_priv
>
> avr32 updates the thread flags 1 - non atomically and 2 - with the wrong value
> (for TIF_SINGLE_STEP) in this function.
>
> It applies to 2.6.20.
Thanks, but this has already been fixed by a19b4a14053f for 2.6.21.
Haavard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-09 7:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-09 3:21 [PATCH] Fix avr32 TIF atomicity in do_debug_priv Mathieu Desnoyers
2007-03-09 7:35 ` Haavard Skinnemoen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.