Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2674485rwb; Fri, 16 Dec 2022 05:16:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf5vuGfer7gYGuF+AuRm0svmGpK+i9U/lhXk2HHqUcVvXLmKv+SelDLfoT999JAvG6MZyqrI X-Received: by 2002:a05:6a20:d90a:b0:a3:587b:56ac with SMTP id jd10-20020a056a20d90a00b000a3587b56acmr39545977pzb.52.1671196568866; Fri, 16 Dec 2022 05:16:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671196568; cv=none; d=google.com; s=arc-20160816; b=afG5hAKzguzf0H8oczhvI0X92FnR2T+Q/mNrkycKHBrFntnPpzru8leJ+WhcRHCKxj vIABoGIBJyv/Hrt06q8d/eY9CT6UC1ra5lTiK36GNM59dmDaz1LDeMCzzeVHU1AA3UKL IP/cVH4CBxqnaMg/xZYIZbrX/uwGUUPfw73kXmWUSflRTfkcEjNVLi0TN4jgjWxLB6YF /azB+NXcIqtr2g2UciYlOMKstWgZGN0pSQVqZQrPVRBA+ih0YWj1+tWtASzFOgfU2961 YeK4LCSSLFQcp0f1HvEd/7/6Ge2xBacAdVIashb//b4EgfXBaVk59H0npB9ZQfUuLOml PJqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=jXF9c7i/pRZwb/zK4b3gP0kYwDE/+CkuRpF8ttFbdN4=; b=y5WqaCGarUNjcn92VU4dixqbL1goBISjQXN12ymEOZ6f7a8EknTXZtH0LMZdoRmrw0 zcZsQQYjDEfAKBtPS/lLLT/N6Oe1klwkmM+f0vicfztNiUPGpl/TimGfguUCGektUbQ1 EJZWZgq7W90d5nN2JfXXcL8Bz1fvb6zjoN2m7oD2ZHwjt2LFyfMufzX8HPMgOJRd1a5M a92QV4NE9eIYjbaGaNqpO6bpm+1bGfYU4iEYvqohR+PuwVAmjpWpgaABap/jCFyMMJN2 IfJEvOts6EGUMv0Hsv0LPyPa2DmtvP7yVIs9sp+cJmpnJiDGn6gV9NAo6folLyTox1Jn B9AQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g195-20020a6252cc000000b00541c0da3083si2230515pfb.302.2022.12.16.05.15.59; Fri, 16 Dec 2022 05:16:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229583AbiLPNGc (ORCPT + 68 others); Fri, 16 Dec 2022 08:06:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230419AbiLPNGB (ORCPT ); Fri, 16 Dec 2022 08:06:01 -0500 Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95B052A960; Fri, 16 Dec 2022 05:06:00 -0800 (PST) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-43ea87d0797so3742007b3.5; Fri, 16 Dec 2022 05:06:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jXF9c7i/pRZwb/zK4b3gP0kYwDE/+CkuRpF8ttFbdN4=; b=l6PATB868fr4d3YF83iMoL9gZrL0DVm5wVxcQGRgLaPJWSjgEyZ2i/DNHtmiWYnfFp 05+Y7EpMmJahQTNDiusfHkkfykV163RdO7IZbZe+4s6rMl9wWmC4wz9yybZh5Ff/EhmU Ox1i9LDd4rt4VUQUE22W2tDjONMjM5LnKOzD5Pc2MKf9D26t1/jbg49/64+uavx7HDgP 7hT4xWheJ/8jS2mTnxxc7FBvm8Z6zRLgKWAfU1PiCOIsnIi5UnJyOctvdqXgZF10sFIi scgsukm03YXe8RnXnp0o9EprOpEQJ9NQbAUByBOywwUuk1dyXJwSqMECoQAOntmSEdPN Id0A== X-Gm-Message-State: ANoB5pkkpc6C2jvYlGU3a5A4o3hFPQsXNCugvdtzuysPs7fOwvuKAXIa OlO3Qlepr5xMOVUT3jiBXjFOhn5WQTfFPA== X-Received: by 2002:a05:7500:579f:b0:eb:5db:86f4 with SMTP id bz31-20020a057500579f00b000eb05db86f4mr4204563gab.62.1671195959208; Fri, 16 Dec 2022 05:05:59 -0800 (PST) Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com. [209.85.128.178]) by smtp.gmail.com with ESMTPSA id y18-20020a37f612000000b006fefa5f7fcesm1465631qkj.10.2022.12.16.05.05.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Dec 2022 05:05:58 -0800 (PST) Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-3f15a6f72d0so32136857b3.1; Fri, 16 Dec 2022 05:05:58 -0800 (PST) X-Received: by 2002:a0d:dd4b:0:b0:370:61f5:b19e with SMTP id g72-20020a0ddd4b000000b0037061f5b19emr28600389ywe.316.1671195958287; Fri, 16 Dec 2022 05:05:58 -0800 (PST) MIME-Version: 1.0 References: <20221215170234.2515030-1-arnd@kernel.org> In-Reply-To: <20221215170234.2515030-1-arnd@kernel.org> From: Geert Uytterhoeven Date: Fri, 16 Dec 2022 14:05:46 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] fbdev: omapfb: avoid stack overflow warning To: Arnd Bergmann Cc: Helge Deller , Arnd Bergmann , Zhang Qilong , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On Thu, Dec 15, 2022 at 6:05 PM Arnd Bergmann wrote: > From: Arnd Bergmann > > The dsi_irq_stats structure is a little too big to fit on the > stack of a 32-bit task, depending on the specific gcc options: > > fbdev/omap2/omapfb/dss/dsi.c: In function 'dsi_dump_dsidev_irqs': > fbdev/omap2/omapfb/dss/dsi.c:1621:1: error: the frame size of 1064 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] > > Since this is only a debugfs file, performance is not critical, > so just dynamically allocate it, and print an error message > in there in place of a failure code when the allocation fails. > > Signed-off-by: Arnd Bergmann Thanks for your patch! > --- a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c > +++ b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c > @@ -1536,22 +1536,28 @@ static void dsi_dump_dsidev_irqs(struct platform_device *dsidev, > { > struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); > unsigned long flags; > - struct dsi_irq_stats stats; > + struct dsi_irq_stats *stats; > + > + stats = kzalloc(sizeof(*stats), GFP_KERNEL); > + if (!stats) { > + seq_printf(s, "out of memory\n"); I guess this is futile? No need to increase kernel size for OOM messages. > + return; > + } > > spin_lock_irqsave(&dsi->irq_stats_lock, flags); Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds