Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752586AbcDZSxV (ORCPT ); Tue, 26 Apr 2016 14:53:21 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:36828 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752039AbcDZSxT (ORCPT ); Tue, 26 Apr 2016 14:53:19 -0400 MIME-Version: 1.0 In-Reply-To: <1461685993-1049370-1-git-send-email-arnd@arndb.de> References: <1461685993-1049370-1-git-send-email-arnd@arndb.de> From: Saeed Mahameed Date: Tue, 26 Apr 2016 21:52:58 +0300 Message-ID: Subject: Re: [PATCH v2] net/mlx5e: avoid stack overflow in mlx5e_open_channels To: Arnd Bergmann Cc: Saeed Mahameed , Matan Barak , Leon Romanovsky , "David S. Miller" , Achiad Shochat , Or Gerlitz , Amir Vadai , Tariq Toukan , Linux Netdev List , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 822 Lines: 17 On Tue, Apr 26, 2016 at 6:52 PM, Arnd Bergmann wrote: > struct mlx5e_channel_param is a large structure that is allocated > on the stack of mlx5e_open_channels, and with a recent change > it has grown beyond the warning size for the maximum stack > that a single function should use: > > mellanox/mlx5/core/en_main.c: In function 'mlx5e_open_channels': > mellanox/mlx5/core/en_main.c:1325:1: error: the frame size of 1072 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] > > The function is already using dynamic allocation and is not in > a fast path, so the easiest workaround is to use another kzalloc > for allocating the channel parameters. > > Signed-off-by: Arnd Bergmann > Fixes: d3c9bc2743dc ("net/mlx5e: Added ICO SQs") Acked-by: Saeed Mahameed