Project

General

Profile

Actions

Feature #3224

open

121: Requesting a threaded interrupt without a primary handler and without IRQF_ONESHOT is not permitted

Added by Denis Efremov over 11 years ago. Updated over 11 years ago.

Status:
New
Priority:
Normal
Assignee:
Start date:
07/18/2012
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

commit 1c6c69525b40eb76de8adf039409722015927dc3
https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=1c6c6952

Requesting a threaded interrupt without a primary handler and without
IRQF_ONESHOT set is dangerous.

The core will use the default primary handler for it, which merily
wakes the thread. For a level type interrupt this results in an
interrupt storm, because the interrupt line is reenabled after the
primary handler runs. The device has still the line asserted, which
brings us back into the primary handler.

While this works for edge type interrupts, we play it safe and reject
unconditionally because we can't say for sure which type this
interrupt really has. The type flags are unreliable as the underlying
chip implementation can override them. And we cannot assume that
developers using that interface know what they are doing.

Fixing commits:
1) https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=623b51fc8642fd3c795fa9903be3adaa537ad9c5
2) https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=a76beb14123a69ca080f5a5425e28b786d62318d
3) https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=6b91bf1a3f52f5fdf40f5aaeb09a06b4d49556cc
4) https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=16a50b1270455a6d41f9f6d8f99a72cf9d76824a

Actions #1

Updated by Denis Efremov over 11 years ago

  • Subject changed from 119 to 121: Requesting a threaded interrupt without a primary handler and without IRQF_ONESHOT is not permitted
  • Description updated (diff)
  • Assignee set to Denis Efremov
Actions #2

Updated by Evgeny Novikov over 11 years ago

Good and important rule!

Actions

Also available in: Atom PDF