All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylvain Rochet <sylvain.rochet@finsecur.com>
To: Ludovic Desroches <ludovic.desroches@atmel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	davidcdueck@googlemail.com,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND PATCH] pinctrl: at91: fix null pointer dereference
Date: Thu, 30 Jul 2015 10:33:43 +0200	[thread overview]
Message-ID: <20150730083343.GA23018@gradator.net> (raw)
In-Reply-To: <20150728131253.GA4055@odux.rfo.atmel.com>

Hello Ludovic,

On Tue, Jul 28, 2015 at 03:12:53PM +0200, Ludovic Desroches wrote:
> On Tue, Jul 28, 2015 at 02:48:09PM +0200, Linus Walleij wrote:
> > On Tue, Jul 28, 2015 at 9:48 AM, Ludovic Desroches
> > <ludovic.desroches@atmel.com> wrote:
> > 
> > > From: David Dueck <davidcdueck@googlemail.com>
> > >
> > > Not all gpio banks are necessarily enabled, in the current code this can
> > > lead to null pointer dereferences.
> > >
> > > [   51.130000] Unable to handle kernel NULL pointer dereference at virtual address 00000058
> > (...)
> > >
> > > Signed-off-by: David Dueck <davidcdueck@googlemail.com>
> > > Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> > > Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > > CC: Nicolas Ferre <nicolas.ferre@atmel.com>
> > > CC: Boris Brezillon <boris.brezillon@free-electrons.com>
> > > CC: linux-arm-kernel@lists.infradead.org
> > > CC: linux-kernel@vger.kernel.org
> > > ---
> > >
> > > This patch fixes a oops in the kernel because of a NULL pointer in a table.
> > > Having a NULL pointer in this table is the normal behavior if a PIO controller
> > > is not enabled. So this fix is not a quick and dirty hack, it's usual to skip
> > > an entry from a table if it is not filled.
> > 
> > Fair enough, better too many checks than too few.
> > 
> > Is this a regression to v4.2 that should go to stable or v4.3 material?
> 
> Yes it is a regression from v4.0, it applies well on v4.0.9
> 
> Fixes: a0b957f306fa ("pinctrl: at91: allow to have disabled gpio bank")
> Cc: stable@vger.kernel.org # 4.0

a0b957f306fa have a stable tag up to 3.18, should this patch inherit a 
stable tag up to 3.18 instead of only up to 4.0 ?

Sylvain

WARNING: multiple messages have this Message-ID (diff)
From: sylvain.rochet@finsecur.com (Sylvain Rochet)
To: linux-arm-kernel@lists.infradead.org
Subject: [RESEND PATCH] pinctrl: at91: fix null pointer dereference
Date: Thu, 30 Jul 2015 10:33:43 +0200	[thread overview]
Message-ID: <20150730083343.GA23018@gradator.net> (raw)
In-Reply-To: <20150728131253.GA4055@odux.rfo.atmel.com>

Hello Ludovic,

On Tue, Jul 28, 2015 at 03:12:53PM +0200, Ludovic Desroches wrote:
> On Tue, Jul 28, 2015 at 02:48:09PM +0200, Linus Walleij wrote:
> > On Tue, Jul 28, 2015 at 9:48 AM, Ludovic Desroches
> > <ludovic.desroches@atmel.com> wrote:
> > 
> > > From: David Dueck <davidcdueck@googlemail.com>
> > >
> > > Not all gpio banks are necessarily enabled, in the current code this can
> > > lead to null pointer dereferences.
> > >
> > > [   51.130000] Unable to handle kernel NULL pointer dereference at virtual address 00000058
> > (...)
> > >
> > > Signed-off-by: David Dueck <davidcdueck@googlemail.com>
> > > Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> > > Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > > CC: Nicolas Ferre <nicolas.ferre@atmel.com>
> > > CC: Boris Brezillon <boris.brezillon@free-electrons.com>
> > > CC: linux-arm-kernel at lists.infradead.org
> > > CC: linux-kernel at vger.kernel.org
> > > ---
> > >
> > > This patch fixes a oops in the kernel because of a NULL pointer in a table.
> > > Having a NULL pointer in this table is the normal behavior if a PIO controller
> > > is not enabled. So this fix is not a quick and dirty hack, it's usual to skip
> > > an entry from a table if it is not filled.
> > 
> > Fair enough, better too many checks than too few.
> > 
> > Is this a regression to v4.2 that should go to stable or v4.3 material?
> 
> Yes it is a regression from v4.0, it applies well on v4.0.9
> 
> Fixes: a0b957f306fa ("pinctrl: at91: allow to have disabled gpio bank")
> Cc: stable at vger.kernel.org # 4.0

a0b957f306fa have a stable tag up to 3.18, should this patch inherit a 
stable tag up to 3.18 instead of only up to 4.0 ?

Sylvain

  reply	other threads:[~2015-07-30  8:33 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02 16:06 [PATCH] pinctrl: at91: fix null pointer dereference David Dueck
2015-07-02 16:06 ` David Dueck
2015-07-03  9:38 ` Ludovic Desroches
2015-07-03  9:38   ` Ludovic Desroches
2015-07-03  9:38   ` Ludovic Desroches
2015-07-07 17:02 ` Alexandre Belloni
2015-07-07 17:02   ` Alexandre Belloni
2015-07-13  6:14 ` Jean-Christophe PLAGNIOL-VILLARD
2015-07-13  6:14   ` Jean-Christophe PLAGNIOL-VILLARD
2015-07-13 13:00   ` Ludovic Desroches
2015-07-13 13:00     ` Ludovic Desroches
2015-07-13 20:30     ` Jean-Christophe PLAGNIOL-VILLARD
2015-07-13 20:30       ` Jean-Christophe PLAGNIOL-VILLARD
2015-07-15 13:30       ` Ludovic Desroches
2015-07-15 13:30         ` Ludovic Desroches
2015-07-28  7:48         ` [RESEND PATCH] " Ludovic Desroches
2015-07-28  7:48           ` Ludovic Desroches
2015-07-28  7:48           ` Ludovic Desroches
2015-07-28  8:00           ` Nicolas Ferre
2015-07-28  8:00             ` Nicolas Ferre
2015-07-28  8:00             ` Nicolas Ferre
2015-07-28 12:48           ` Linus Walleij
2015-07-28 12:48             ` Linus Walleij
2015-07-28 13:12             ` Ludovic Desroches
2015-07-28 13:12               ` Ludovic Desroches
2015-07-28 13:12               ` Ludovic Desroches
2015-07-30  8:33               ` Sylvain Rochet [this message]
2015-07-30  8:33                 ` Sylvain Rochet
2015-07-30  8:49                 ` Ludovic Desroches
2015-07-30  8:49                   ` Ludovic Desroches
2015-07-30  8:49                   ` Ludovic Desroches
2015-07-30  9:16                   ` Sylvain Rochet
2015-07-30  9:16                     ` Sylvain Rochet
2015-08-03  8:19           ` Linus Walleij
2015-08-03  8:19             ` Linus Walleij

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=20150730083343.GA23018@gradator.net \
    --to=sylvain.rochet@finsecur.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=davidcdueck@googlemail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.desroches@atmel.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.