Re: [PATCH] kcov: properly check if we are in an interrupt

Vegard Nossum
2016-09-27T11:23:26Z

On 09/27/2016 01:20 PM, Vegard Nossum wrote:
> Your patch was:
>
> - if (!t || in_interrupt())
> + if (!t || (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_OFFSET
> + | NMI_MASK)))
>
> But look at the definitions:
>
> #define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK \
> | NMI_MASK))
> #define in_interrupt() (irq_count())
>
> So isn't the patch a no-op to start with?

Eh, SOFTIRQ_OFFSET vs SOFTIRQ_MASK.

I'll just go stand in the corner.

Vegard