Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756476AbaLIDGc (ORCPT ); Mon, 8 Dec 2014 22:06:32 -0500 Received: from mail-ie0-f172.google.com ([209.85.223.172]:62678 "EHLO mail-ie0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751103AbaLIDGb (ORCPT ); Mon, 8 Dec 2014 22:06:31 -0500 MIME-Version: 1.0 In-Reply-To: <1418074473-10811-1-git-send-email-olof@lixom.net> References: <1418074473-10811-1-git-send-email-olof@lixom.net> From: Alexandre Courbot Date: Tue, 9 Dec 2014 12:06:10 +0900 Message-ID: Subject: Re: [PATCH] gpio: bcm-kona: memory corruption fix To: Olof Johansson Cc: Linus Walleij , rjui@broadcom.com, "linux-gpio@vger.kernel.org" , Linux Kernel Mailing List , bcm-kernel-feedback-list@broadcom.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 9, 2014 at 6:34 AM, Olof Johansson wrote: > In one instance the base address of the internal controller state > structure is passed into a function doing writel to an offset of > the pointer passed in is used, instead of the register base. > > Once I found the bug, I also went back to check for other sparse > warnings in the file, but found none. This one, however, triggered: > > drivers/gpio/gpio-bcm-kona.c:552:47: warning: incorrect type in argument 1 (different address spaces) > drivers/gpio/gpio-bcm-kona.c:552:47: expected void [noderef] *reg_base > drivers/gpio/gpio-bcm-kona.c:552:47: got struct bcm_kona_gpio *kona_gpio > drivers/gpio/gpio-bcm-kona.c:556:47: warning: incorrect type in argument 1 (different address spaces) > drivers/gpio/gpio-bcm-kona.c:556:47: expected void [noderef] *reg_base > drivers/gpio/gpio-bcm-kona.c:556:47: got struct bcm_kona_gpio *kona_gpio > > As far as I can tell, this bug has been here for a long time and is > not new, but I found it when hunting down another heisenbug on this > platform. Ouch. Thanks for fixing this. Reviewed-by: Alexandre Courbot -- 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/