Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752786AbdF2QPe (ORCPT ); Thu, 29 Jun 2017 12:15:34 -0400 Received: from imap0.codethink.co.uk ([185.43.218.159]:38244 "EHLO imap0.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751690AbdF2QP0 (ORCPT ); Thu, 29 Jun 2017 12:15:26 -0400 Message-ID: <1498752917.1935.52.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 16/30] [media] pvrusb2: reduce stack usage pvr2_eeprom_analyze() From: Ben Hutchings To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Arnd Bergmann , Hans Verkuil , Mauro Carvalho Chehab Date: Thu, 29 Jun 2017 17:15:17 +0100 In-Reply-To: <20170619152034.086147988@linuxfoundation.org> References: <20170619152033.211450261@linuxfoundation.org> <20170619152034.086147988@linuxfoundation.org> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1404 Lines: 40 On Mon, 2017-06-19 at 23:20 +0800, Greg Kroah-Hartman wrote: > 4.4-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Arnd Bergmann > > commit 6830733d53a4517588e56227b9c8538633f0c496 upstream. > > The driver uses a relatively large data structure on the stack, which > showed up on my radar as we get a warning with the "latent entropy" > GCC plugin: > > drivers/media/usb/pvrusb2/pvrusb2-eeprom.c:153:1: error: the frame size of 1376 bytes is larger than 1152 bytes [-Werror=frame-larger-than=] > > The warning is usually hidden as we raise the warning limit to 2048 > when the plugin is enabled, but I'd like to lower that again in the > future, and making this function smaller helps to do that without > build regressions. > > Further analysis shows that putting an 'i2c_client' structure on > the stack is not really supported, as the embedded 'struct device' > is not initialized here, and we are only saved by the fact that > the function that is called here does not use the pointer at all. [...] That is not true in 4.4-stable. This commit depends on: commit 6037b3ca28f4258d913dbe77248fd77827702ae3 Author: Mauro Carvalho Chehab Date: Wed Nov 16 14:21:48 2016 -0200 [media] tveeprom: print log messages using pr_foo() Ben. -- Ben Hutchings Software Developer, Codethink Ltd.