Re: [PATCH v2] irqdomain: potential Oops in irq_domain_push_irq()

From: Thomas Gleixner
Date: Fri Aug 25 2017 - 07:08:34 EST


On Fri, 25 Aug 2017, Dan Carpenter wrote:

> This code generates a Smatch warning:
>
> kernel/irq/irqdomain.c:1511 irq_domain_push_irq()
> warn: variable dereferenced before check 'root_irq_data' (see line 1508)
>
> irq_get_irq_data() does sometimes return NULL pointers so it does look
> like this code could Oops. I've moved the check for NULL earlier to
> fix this bug.

>From Documentation/process/submitting-patches.rst:

"Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy
to do frotz", as if you are giving orders to the codebase to change
its behaviour."

Is it that hard to read _and_ understand what those instructions mean?

Thanks,

tglx