lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 7 Aug 2014 13:48:31 +0200
From:	Ralf Baechle <ralf@...ux-mips.org>
To:	Wei.Yang@...driver.com
Cc:	a.p.zijlstra@...llo.nl, paulus@...ba.org, mingo@...hat.com,
	acme@...nel.org, linux-kernel@...r.kernel.org,
	linux-mips@...ux-mips.org
Subject: Re: [PATCH v1] MIPS: perf: Mark pmu interupt IRQF_NO_THREAD

On Tue, Aug 05, 2014 at 01:37:47PM +0800, Wei.Yang@...driver.com wrote:

> From: Yang Wei <Wei.Yang@...driver.com>
> 
> In RT kernel, I ran into the following calltrace, so PMU interrupts cannot
> be threaded
> 
> in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/0
> INFO: lockdep is turned off.
> Call Trace:
> [<ffffffff8088595c>] dump_stack+0x1c/0x50
> [<ffffffff801a958c>] __might_sleep+0x13c/0x148
> [<ffffffff80891c54>] rt_spin_lock+0x3c/0xb0
> [<ffffffff801ad29c>] __wake_up+0x3c/0x80
> [<ffffffff80243ba4>] perf_event_wakeup+0x8c/0xf8
> [<ffffffff80243c50>] perf_pending_event+0x40/0x78
> [<ffffffff8023d88c>] irq_work_run+0x74/0xc0
> [<ffffffff80152640>] mipsxx_pmu_handle_shared_irq+0x110/0x228
> [<ffffffff8015276c>] mipsxx_pmu_handle_irq+0x14/0x30
> [<ffffffff801ffda4>] handle_irq_event_percpu+0xbc/0x470
> [<ffffffff80204478>] handle_percpu_irq+0x98/0xc8
> [<ffffffff801ff284>] generic_handle_irq+0x4c/0x68
> [<ffffffff8089748c>] do_IRQ+0x2c/0x48
> [<ffffffff80105864>] plat_irq_dispatch+0x64/0xd0 

Hm...  I don't see why based on this backtrace you concluce the
handler needs to be marked IRQF_NO_THREAD.  However there's another
reason to mark it IRQF_NO_THREAD.  IRQ threads may be rescheduled to
other CPUs but this handler is fiddling with per-CPU resources.

See https://patchwork.linux-mips.org/patch/2818/ for a similar
scenario a few years ago.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ