From mboxrd@z Thu Jan 1 00:00:00 1970 From: Krzysztof Kozlowski Subject: Re: [PATCH] pinctrl-exynos5440: Use off-stack memory for pinctrl_gpio_range Date: Tue, 19 Apr 2016 10:19:11 +0200 Message-ID: <5715E9FF.6080000@samsung.com> References: <1461039222-26592-1-git-send-email-andrew@aj.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mailout1.w1.samsung.com ([210.118.77.11]:56963 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113AbcDSITR (ORCPT ); Tue, 19 Apr 2016 04:19:17 -0400 In-reply-to: Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Tomasz Figa , Andrew Jeffery , Sylwester Nawrocki Cc: "linux-samsung-soc@vger.kernel.org" , Linus Walleij , Kukjin Kim , Thomas P Abraham , linux-arm-kernel , "linux-gpio@vger.kernel.org" , linux-kernel , stable@vger.kernel.org On 04/19/2016 09:24 AM, Tomasz Figa wrote: > Hi Andrew, > > 2016-04-19 13:13 GMT+09:00 Andrew Jeffery : >> The range is registered into a linked list which can be referenced >> throughout the lifetime of the driver. Ensure the range's memory is useful >> for the same lifetime by adding it to the driver's private data structure. >> >> The bug was introduced in the driver's initial commit, which was present in >> v3.10. >> >> Signed-off-by: Andrew Jeffery >> Fixes: f0b9a7e521fa ("pinctrl: exynos5440: add pinctrl driver for Samsung EXYNOS5440 SoC") >> Cc: stable@vger.kernel.org >> --- >> This is my first contribution to the kernel, so hopefully I've followed all the >> relevant documentation. If not, please let me know and point me in the right >> direction! >> >> I don't have the means to test the patch, but it compiles. Someone with >> appropriate hardware should probably give it a spin. >> > > Thanks for the patch. Good catch, I wonder how this even worked. Just > one minor nitpick below. > > Unfortunately I don't have any platform based on this SoC to test, so > I'll defer to Krzysztof or Sylwester to handle this. We don't have this board neither, it is not so popular and apparently not many people are using it because such bug remained unnoticed. Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbcDSITV (ORCPT ); Tue, 19 Apr 2016 04:19:21 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:56963 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113AbcDSITR (ORCPT ); Tue, 19 Apr 2016 04:19:17 -0400 X-AuditID: cbfec7f5-f792a6d000001302-3e-5715ea0161e3 Subject: Re: [PATCH] pinctrl-exynos5440: Use off-stack memory for pinctrl_gpio_range To: Tomasz Figa , Andrew Jeffery , Sylwester Nawrocki References: <1461039222-26592-1-git-send-email-andrew@aj.id.au> Cc: "linux-samsung-soc@vger.kernel.org" , Linus Walleij , Kukjin Kim , Thomas P Abraham , linux-arm-kernel , "linux-gpio@vger.kernel.org" , linux-kernel , stable@vger.kernel.org From: Krzysztof Kozlowski Message-id: <5715E9FF.6080000@samsung.com> Date: Tue, 19 Apr 2016 10:19:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBLMWRmVeSWpSXmKPExsVy+t/xy7qMr0TDDX78V7DYdZnD4vULQ4v+ x6+ZLab8Wc5ksenxNVaLzfP/MFpc3jWHzWLG+X1MFofftLNaLNj4iNGiYxmjxapdfxgdeDyu tu9i99g56y67x6ZVnWwed67tYfPYvKTeo2/LKkaPz5vkAtijuGxSUnMyy1KL9O0SuDKm3t3L VDCdu6L91lHWBsZmzi5GTg4JAROJ6StPMEPYYhIX7q1nA7GFBJYySuyYbNbFyAVkP2OUeHKz mx0kISwQJjHh6DywIhGBCokpT14yQxS1MUpcf7yXFSTBLNDILPF0qy+IzSZgLLF5+RKgBg4O XgEtidvTK0DCLAKqEjP6doPNERWIkHgy9yQjiM0rICjxY/I9FhCbUyBYYuKE1YwgrcwC6hJT puRCTJeX2LzmLfMERoFZSDpmIVTNQlK1gJF5FaNoamlyQXFSeq6RXnFibnFpXrpecn7uJkZI fHzdwbj0mNUhRgEORiUe3hVFouFCrIllxZW5hxglOJiVRHhZXwCFeFMSK6tSi/Lji0pzUosP MUpzsCiJ887c9T5ESCA9sSQ1OzW1ILUIJsvEwSnVwDhvyffTE/0XPU+Se3d37oW45cZcC+00 u1YdvdnEv7HlQquqQPnVdacaJpYVKDi8mXfscFmf1u2Vj1YpLFy/SuXxXsljd5xOF17Z/6+V 9VGyw6S/PKfmq6rt7fyQ4ZB8xvZu96r9/1Q/70q96XSjwWhzznereLFE7f8JCheubpl1Y7rk q4yzX37UK7EUZyQaajEXFScCAH/8aA6LAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/19/2016 09:24 AM, Tomasz Figa wrote: > Hi Andrew, > > 2016-04-19 13:13 GMT+09:00 Andrew Jeffery : >> The range is registered into a linked list which can be referenced >> throughout the lifetime of the driver. Ensure the range's memory is useful >> for the same lifetime by adding it to the driver's private data structure. >> >> The bug was introduced in the driver's initial commit, which was present in >> v3.10. >> >> Signed-off-by: Andrew Jeffery >> Fixes: f0b9a7e521fa ("pinctrl: exynos5440: add pinctrl driver for Samsung EXYNOS5440 SoC") >> Cc: stable@vger.kernel.org >> --- >> This is my first contribution to the kernel, so hopefully I've followed all the >> relevant documentation. If not, please let me know and point me in the right >> direction! >> >> I don't have the means to test the patch, but it compiles. Someone with >> appropriate hardware should probably give it a spin. >> > > Thanks for the patch. Good catch, I wonder how this even worked. Just > one minor nitpick below. > > Unfortunately I don't have any platform based on this SoC to test, so > I'll defer to Krzysztof or Sylwester to handle this. We don't have this board neither, it is not so popular and apparently not many people are using it because such bug remained unnoticed. Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof From mboxrd@z Thu Jan 1 00:00:00 1970 From: k.kozlowski@samsung.com (Krzysztof Kozlowski) Date: Tue, 19 Apr 2016 10:19:11 +0200 Subject: [PATCH] pinctrl-exynos5440: Use off-stack memory for pinctrl_gpio_range In-Reply-To: References: <1461039222-26592-1-git-send-email-andrew@aj.id.au> Message-ID: <5715E9FF.6080000@samsung.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 04/19/2016 09:24 AM, Tomasz Figa wrote: > Hi Andrew, > > 2016-04-19 13:13 GMT+09:00 Andrew Jeffery : >> The range is registered into a linked list which can be referenced >> throughout the lifetime of the driver. Ensure the range's memory is useful >> for the same lifetime by adding it to the driver's private data structure. >> >> The bug was introduced in the driver's initial commit, which was present in >> v3.10. >> >> Signed-off-by: Andrew Jeffery >> Fixes: f0b9a7e521fa ("pinctrl: exynos5440: add pinctrl driver for Samsung EXYNOS5440 SoC") >> Cc: stable at vger.kernel.org >> --- >> This is my first contribution to the kernel, so hopefully I've followed all the >> relevant documentation. If not, please let me know and point me in the right >> direction! >> >> I don't have the means to test the patch, but it compiles. Someone with >> appropriate hardware should probably give it a spin. >> > > Thanks for the patch. Good catch, I wonder how this even worked. Just > one minor nitpick below. > > Unfortunately I don't have any platform based on this SoC to test, so > I'll defer to Krzysztof or Sylwester to handle this. We don't have this board neither, it is not so popular and apparently not many people are using it because such bug remained unnoticed. Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof