mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de,
	mingo@kernel.org, linux-tip-commits@vger.kernel.org
Subject: Re: [tip:irq/core] genirq: Use a common macro to go through the actions list
Date: Mon, 8 Feb 2016 16:26:03 +0100	[thread overview]
Message-ID: <56B8B38B.1050401@linaro.org> (raw)
In-Reply-To: <tip-aff62cf66ad6065ce04fc3454a11ec19714537fb@git.kernel.org>

On 02/08/2016 11:48 AM, tip-bot for Daniel Lezcano wrote:
> Commit-ID:  aff62cf66ad6065ce04fc3454a11ec19714537fb
> Gitweb:     http://git.kernel.org/tip/aff62cf66ad6065ce04fc3454a11ec19714537fb
> Author:     Daniel Lezcano <daniel.lezcano@linaro.org>
> AuthorDate: Thu, 14 Jan 2016 10:54:13 +0100
> Committer:  Thomas Gleixner <tglx@linutronix.de>
> CommitDate: Mon, 8 Feb 2016 11:45:21 +0100
>
> genirq: Use a common macro to go through the actions list
>
> The irq code browses the list of actions differently to inspect the element
> one by one. Even if it is not a problem, for the sake of consistent code,
> provide a macro similar to for_each_irq_desc in order to have the same loop to
> go through the actions list and use it in the code.
>
> [ tglx: Renamed the macro ]
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Link: http://lkml.kernel.org/r/1452765253-31148-1-git-send-email-daniel.lezcano@linaro.org
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
>   kernel/irq/handle.c    | 5 ++---
>   kernel/irq/internals.h | 3 +++
>   kernel/irq/manage.c    | 8 +++-----
>   kernel/irq/proc.c      | 2 +-
>   kernel/irq/spurious.c  | 4 +---
>   5 files changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
> index 57bff78..67534d0 100644
> --- a/kernel/irq/handle.c
> +++ b/kernel/irq/handle.c
> @@ -136,10 +136,9 @@ irqreturn_t handle_irq_event_percpu(struct irq_desc *desc)
>   {
>   	irqreturn_t retval = IRQ_NONE;
>   	unsigned int flags = 0, irq = desc->irq_data.irq;
> -	struct irqaction *action = desc->action;
> +	struct irqaction *action;
>
> -	/* action might have become NULL since we dropped the lock */
> -	while (action) {
> +	for_each_action_of_desc(desc, action) {
>   		irqreturn_t res;
>
>   		trace_irq_handler_entry(irq, action);

The merge lost the removal of:

action = action->next;

resulting to the NULL pointer dereference bug spotted by 01.org.

Do you want me to resend a new patch ?

   -- Daniel


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2016-02-08 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14  9:54 [PATCH] irq: " Daniel Lezcano
2016-02-08 10:48 ` [tip:irq/core] genirq: " tip-bot for Daniel Lezcano
2016-02-08 15:26   ` Daniel Lezcano [this message]
2016-02-14 23:12 ` tip-bot for Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56B8B38B.1050401@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome