From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: Re: [PATCH -next] gpio: xilinx: Do not use gpiochip_get_data() in xgpio_save_regs() Date: Thu, 7 Jan 2016 06:49:12 -0800 Message-ID: <568E7AE8.3060207@roeck-us.net> References: <1452126010-1111-1-git-send-email-linux@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Linus Walleij Cc: Alexandre Courbot , "linux-kernel@vger.kernel.org" , Michal Simek , "linux-arm-kernel@lists.infradead.org" , "linux-gpio@vger.kernel.org" List-Id: linux-gpio@vger.kernel.org On 01/07/2016 01:07 AM, Linus Walleij wrote: > On Thu, Jan 7, 2016 at 1:20 AM, Guenter Roeck wrote: > >> Commit 097d88e94c44 ("gpio: xilinx: use gpiochip data pointer") replaces >> the use of container_of() with gpiochip_get_data(). Unfortunately, the >> data pointer is not yet set by the time xgpio_save_regs() is called, >> causing a system hang. >> >> Fixes: 097d88e94c44 ("gpio: xilinx: use gpiochip data pointer") >> Signed-off-by: Guenter Roeck >> --- >> It might make sense to merge this patch with the patch introducing the problem. > > Patch applied, thanks for finding and fixing this so quick! > Code inspection shows that there are two more - I'll send patches today. Guenter From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753462AbcAGOvm (ORCPT ); Thu, 7 Jan 2016 09:51:42 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:32812 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753062AbcAGOtQ (ORCPT ); Thu, 7 Jan 2016 09:49:16 -0500 Subject: Re: [PATCH -next] gpio: xilinx: Do not use gpiochip_get_data() in xgpio_save_regs() To: Linus Walleij References: <1452126010-1111-1-git-send-email-linux@roeck-us.net> Cc: Alexandre Courbot , Michal Simek , "linux-gpio@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" From: Guenter Roeck Message-ID: <568E7AE8.3060207@roeck-us.net> Date: Thu, 7 Jan 2016 06:49:12 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/07/2016 01:07 AM, Linus Walleij wrote: > On Thu, Jan 7, 2016 at 1:20 AM, Guenter Roeck wrote: > >> Commit 097d88e94c44 ("gpio: xilinx: use gpiochip data pointer") replaces >> the use of container_of() with gpiochip_get_data(). Unfortunately, the >> data pointer is not yet set by the time xgpio_save_regs() is called, >> causing a system hang. >> >> Fixes: 097d88e94c44 ("gpio: xilinx: use gpiochip data pointer") >> Signed-off-by: Guenter Roeck >> --- >> It might make sense to merge this patch with the patch introducing the problem. > > Patch applied, thanks for finding and fixing this so quick! > Code inspection shows that there are two more - I'll send patches today. Guenter From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@roeck-us.net (Guenter Roeck) Date: Thu, 7 Jan 2016 06:49:12 -0800 Subject: [PATCH -next] gpio: xilinx: Do not use gpiochip_get_data() in xgpio_save_regs() In-Reply-To: References: <1452126010-1111-1-git-send-email-linux@roeck-us.net> Message-ID: <568E7AE8.3060207@roeck-us.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 01/07/2016 01:07 AM, Linus Walleij wrote: > On Thu, Jan 7, 2016 at 1:20 AM, Guenter Roeck wrote: > >> Commit 097d88e94c44 ("gpio: xilinx: use gpiochip data pointer") replaces >> the use of container_of() with gpiochip_get_data(). Unfortunately, the >> data pointer is not yet set by the time xgpio_save_regs() is called, >> causing a system hang. >> >> Fixes: 097d88e94c44 ("gpio: xilinx: use gpiochip data pointer") >> Signed-off-by: Guenter Roeck >> --- >> It might make sense to merge this patch with the patch introducing the problem. > > Patch applied, thanks for finding and fixing this so quick! > Code inspection shows that there are two more - I'll send patches today. Guenter