mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
crypto: amlogic - Fix IRQ handler return value and fallthrough logic
In meson_irq_handler(), when an interrupt matches a flow but the status
register is empty, the driver prints an error but doesn't return. It
falls through the loop and incorrectly prints an `unknown irq` message.
Fix this by returning immediately. For empty status registers, return
IRQ_NONE instead of IRQ_HANDLED to avoid masking spurious interrupts and
allow the kernel to detect interrupt storms. Also use
dev_err_ratelimited() to prevent console lockups during an interrupt
storm.
Additionally, the handler returned IRQ_HANDLED for genuinely unknown
interrupts. Return IRQ_NONE instead for unhandled interrupts.
Cc: stable@vger.kernel.org
Fixes: 48fe583fe5 ("crypto: amlogic - Add crypto accelerator for amlogic GXL")
Signed-off-by: Mohamad Raizudeen <raizudeen.kerneldev@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
1dfb35de08
commit
4b8ae27320
|
|
@ -37,12 +37,13 @@ static irqreturn_t meson_irq_handler(int irq, void *data)
|
|||
complete(&mc->chanlist[flow].complete);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
dev_err(mc->dev, "%s %d Got irq for flow %d but ctrl is empty\n", __func__, irq, flow);
|
||||
dev_err_ratelimited(mc->dev, "%s %d Got irq for flow %d but ctrl is empty\n", __func__, irq, flow);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
dev_err(mc->dev, "%s %d from unknown irq\n", __func__, irq);
|
||||
return IRQ_HANDLED;
|
||||
dev_err_ratelimited(mc->dev, "%s %d from unknown irq\n", __func__, irq);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
static struct meson_alg_template mc_algs[] = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user