From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754046AbcBZNow (ORCPT ); Fri, 26 Feb 2016 08:44:52 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:20047 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753764AbcBZNov (ORCPT ); Fri, 26 Feb 2016 08:44:51 -0500 Subject: Re: [PATCH, RESEND] xen: allocate gntdev_copy_batch dynamically To: Arnd Bergmann , Konrad Rzeszutek Wilk , David Vrabel References: <1456435523-287763-1-git-send-email-arnd@arndb.de> Cc: linux-arm-kernel@lists.infradead.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org From: Boris Ostrovsky Message-ID: <56D056AB.4020806@oracle.com> Date: Fri, 26 Feb 2016 08:44:11 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1456435523-287763-1-git-send-email-arnd@arndb.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/25/2016 04:25 PM, Arnd Bergmann wrote: > struct gntdev_copy_batch is arguably too large to fit on the kernel stack, > and we get a warning about the stack usage in gntdev_ioctl_grant_copy: > > drivers/xen/gntdev.c:949:1: error: the frame size of 1240 bytes is larger than 1024 bytes > > This changes the code to us a dynamic allocation instead. > > Signed-off-by: Arnd Bergmann > Fixes: a4cdb556cae0 ("xen/gntdev: add ioctl for grant copy") > --- > drivers/xen/gntdev.c | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > > I sent this in January, Boris sent an almost identical patch > as http://www.gossamer-threads.com/lists/xen/devel/414056 > but the bug remains present in mainline and linux-next as of > Feb 25. > > Could you apply one of the patches before the bug makes it > into v4.5? David wanted to shrink the structure size instead: http://www.gossamer-threads.com/lists/xen/devel/414535 -boris