summaryrefslogtreecommitdiffstats
path: root/kernel/irq/irqdesc.c
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2020-06-01 10:15:16 +0200
committerPetr Mladek <pmladek@suse.com>2020-06-01 10:15:16 +0200
commitd053cf0d771f6547cb0537759a9af63cf402908d (patch)
treedf61806e45c6cf7e9cdd0b271f959f0962f8623e /kernel/irq/irqdesc.c
parentMerge branch 'for-5.7-preferred-console' into for-linus (diff)
parentprintk: Remove pr_cont_once() (diff)
downloadlinux-d053cf0d771f6547cb0537759a9af63cf402908d.tar.xz
linux-d053cf0d771f6547cb0537759a9af63cf402908d.zip
Merge branch 'for-5.8' into for-linus
Diffstat (limited to 'kernel/irq/irqdesc.c')
-rw-r--r--kernel/irq/irqdesc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 98a5f10d1900..1a7723604399 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -638,9 +638,15 @@ void irq_init_desc(unsigned int irq)
int generic_handle_irq(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);
+ struct irq_data *data;
if (!desc)
return -EINVAL;
+
+ data = irq_desc_get_irq_data(desc);
+ if (WARN_ON_ONCE(!in_irq() && handle_enforce_irqctx(data)))
+ return -EPERM;
+
generic_handle_irq_desc(desc);
return 0;
}