[BUG?][NOMMU] microblaze: scheduling with interrupts disabled

From: Steven J. Magnani
Date: Thu Mar 04 2010 - 23:02:51 EST


I ran across the following code in kernel/entry-nommu.S:

work_pending:
andi r11, r19, _TIF_NEED_RESCHED
beqi r11, 1f
bralid r15, schedule
nop
1: andi r11, r19, _TIF_SIGPENDING
beqi r11, no_work_pending
addk r5, r1, r0
addik r7, r0, 1
bralid r15, do_signal
addk r6, r0, r0
bri no_work_pending

ENTRY(ret_to_user)
disable_irq

swi r4, r1, PT_R4 /* return val */
swi r3, r1, PT_R3 /* return val */

lwi r6, r31, TS_THREAD_INFO /* get thread info */
lwi r19, r6, TI_FLAGS /* get flags in thread info */
bnei r19, work_pending
no_work_pending:
disable_irq

If I am reading this correctly, it looks like schedule() and do_signal()
can get called with interrupts disabled. This looks like a bug to me. I
would propose to fix it by putting an enable_irq at work_pending.

Comments?
------------------------------------------------------------------------
Steven J. Magnani "I claim this network for MARS!
www.digidescorp.com Earthling, return my space modulator!"

#include <standard.disclaimer>





--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/