Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751753AbbG1NMx (ORCPT ); Tue, 28 Jul 2015 09:12:53 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:24605 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751103AbbG1NMv (ORCPT ); Tue, 28 Jul 2015 09:12:51 -0400 Date: Tue, 28 Jul 2015 15:12:53 +0200 From: Ludovic Desroches To: Linus Walleij CC: Ludovic Desroches , "linux-gpio@vger.kernel.org" , Jean-Christophe PLAGNIOL-VILLARD , , Alexandre Belloni , Nicolas Ferre , Boris Brezillon , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RESEND PATCH] pinctrl: at91: fix null pointer dereference Message-ID: <20150728131253.GA4055@odux.rfo.atmel.com> Mail-Followup-To: Linus Walleij , "linux-gpio@vger.kernel.org" , Jean-Christophe PLAGNIOL-VILLARD , davidcdueck@googlemail.com, Alexandre Belloni , Nicolas Ferre , Boris Brezillon , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" References: <20150715133048.GD14886@odux.rfo.atmel.com> <1438069696-25303-1-git-send-email-ludovic.desroches@atmel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1690 Lines: 43 On Tue, Jul 28, 2015 at 02:48:09PM +0200, Linus Walleij wrote: > On Tue, Jul 28, 2015 at 9:48 AM, Ludovic Desroches > wrote: > > > From: David Dueck > > > > 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 > > Acked-by: Ludovic Desroches > > Acked-by: Alexandre Belloni > > CC: Nicolas Ferre > > CC: Boris Brezillon > > 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 Thanks Ludovic -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/