Re: [BUG?][2.6.25-mm1] sleeping during IRQ disabled

Petr Tesarik
2008-05-02T10:02:11Z

[-- Attachment #1: Type: text/plain, Size: 2684 bytes --]

On Fri, 2008-05-02 at 18:27 +0900, KOSAKI Motohiro wrote:
> Hi
>
> On ia64 2.6.25-mm1, below message is displayed at stress test running.
> Is it bug or not?

This surely is a bug. I bet this was introduced by Hidetoshi's latest
commit:

commit 38477ad75188b2a7370fef7145f956e6c446928b
Author: Hidetoshi Seto
Date: Mon Apr 21 14:34:39 2008 -0700

[IA64] disable interrupts on exit of ia64_trace_syscall

Obviously, if interrupts are disabled and notify_resume_user
synchronizes the RBS, the following condition in __might_sleep() is
true:

if ((in_atomic() || irqs_disabled()) &&

Cheers,
Petr Tesarik

---------------------------------------------
> BUG: sleeping function called from invalid context at kernel/rwsem.c:21
> in_atomic():0, irqs_disabled():1
>
> Call Trace:
> [<a000000100015d00>] show_stack+0x80/0xa0
> sp=e00001608577f840 bsp=e000016085771038
> [<a000000100015d50>] dump_stack+0x30/0x60
> sp=e00001608577fa10 bsp=e000016085771020
> [<a000000100092e80>] __might_sleep+0x1e0/0x2e0
> sp=e00001608577fa10 bsp=e000016085770ff0
> [<a000000100791f00>] down_read+0x20/0x60
> sp=e00001608577fa10 bsp=e000016085770fd0
> [<a00000010015cd50>] access_process_vm+0x70/0x3a0
> sp=e00001608577fa10 bsp=e000016085770f28
> [<a000000100030f60>] ia64_sync_kernel_rbs+0x40/0x100
> sp=e00001608577fa20 bsp=e000016085770ef0
> [<a00000010002f640>] do_sync_rbs+0xc0/0x100
> sp=e00001608577fa30 bsp=e000016085770ec0
> [<a00000010000b250>] unw_init_running+0x70/0xa0
> sp=e00001608577fa40 bsp=e000016085770e98
> [<a000000100033ee0>] ia64_sync_krbs+0x80/0xa0
> sp=e00001608577fe20 bsp=e000016085770e80
> [<a0000001000168a0>] do_notify_resume_user+0x1c0/0x1e0
> sp=e00001608577fe20 bsp=e000016085770e50
> [<a00000010000b0e0>] notify_resume_user+0x40/0x60
> sp=e00001608577fe20 bsp=e000016085770e00
> [<a00000010000b010>] skip_rbs_switch+0xe0/0x110
> sp=e00001608577fe30 bsp=e000016085770e00
> [<a000000000010720>] __kernel_syscall_via_break+0x0/0x20
> sp=e000016085780000 bsp=e000016085770e0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]