From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425744AbcBRJW6 (ORCPT ); Thu, 18 Feb 2016 04:22:58 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:59705 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425290AbcBRJWx (ORCPT ); Thu, 18 Feb 2016 04:22:53 -0500 From: Arnd Bergmann To: Larry Finger Cc: Florian Schilhabel , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, Luis de Bethencourt , Joshua Clayton , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rtl8712: reduce stack usage Date: Thu, 18 Feb 2016 10:21:48 +0100 Message-ID: <3642222.ppVDPONLa4@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <56C52A5F.2030302@lwfinger.net> References: <1455698012-814399-1-git-send-email-arnd@arndb.de> <56C52A5F.2030302@lwfinger.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:uAViJjxCF2hJiiDamTFReWsFXKw+1XiJAYCOGjz/edUXs7Iv+he ilkyH5oqirZesHXpKQAkxHtPem5YK7AqyLlve9vhC1DYUtRClj6PHojPFmqEhd7m9DyTRq8 pA+3CYCEh9qICdUHEZOOAOUg+NoAsD+UzS5U9TnI6/PKnzAoPmPPa48XIxxqYI79jgt+B6f IIajGDcn7AaT+qXDwFqhw== X-UI-Out-Filterresults: notjunk:1;V01:K0:rzDJ6wPpFBI=:lD0OoMpePhEKiv6zOuHHq5 ZTx3Nu9n0ZCIpdSHKmEGBdzxm1PFaDinU8hK/dM8kBA91UVjGNKYTRZuHl7puKe+5dYZsPvDp pSuLJJR8YWHpZLS4Lvg4r1mKptLEOl5AOMbub9sFbRADdtWhDrWIg7DIwlOFwYD9mcthrP5sv Ol7Sr4Uy2zZ6C/rQQ9PNugyDEwkv0k1KtOigdsmttEscpiBhFfjaU4zpRFdF1AzNM1byhjvKJ wbGqAqiJVnyaBVOpUQrJ7CSKm/uxoTHmznh61p4AkBe9hy4/GhZhtGGm6SW3Uj2T0FbM/FIL8 3WxJk5L6SEgg/pTQF24Tnewcazp6HbnEnL0AHzwJNz0GD9awn7w0RHbjqTVNANxK4dyDDcG// iKjICN8/XlO2WkkV2od3YbFAzUJGWUKIu69QqZJ8yXevf7IliHBPVsV00Mqp8q7daQ10jpyVL Vxdm+4gYnSPubiyKjQXO9wRnsWI8nUl1+1XuOWCUZRIExYRRViGk8Eaj7IcLDiKwVdV07/87Z T1Hrn0aqgKqoIZjTQabd1wPr0LgTCe+hK/rOq7Hd5t9X0m3vL0C1j3SnBrCERr9Hq7uTYsryU UE7Gv7K9P7hOHPrn2qNhD94rAM8vyGjoIW1gjxbGuzgpq6k9sa0+oN2LM4+k3syMb+0TSefs8 V4m2JNlhrq+eA6E+EOoOsoHIgoakRdl4ezID+izxdNAixNpA5CxpgIfEC9XBUvmcXI1eXfbbg NeJEVH9x6SPoDxIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 17 February 2016 20:20:15 Larry Finger wrote: > > --- > > drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > As there is no reason for translate_scan() to be inlined, this patch seems > reasonable The largest user of stack likely comes from the line "struct iw_event > iwe". Changing that to a pointer, and using kalloc to acquire the space would > likely clear the compile message, but that would require many more changes. > > Acked-by: Larry Finger > > Thanks! I believe that the problem is the combination of "struct iw_event" and the two buffers "u8 wpa_ie[255], rsn_ie[255];" and "u8 wps_ie[512];". Just to document this better: if we ever decide to use a dynamic allocation, I would allocate all of the above together. Arnd