Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1390508

Re: [PATCH v2] net/mlx5e: avoid stack overflow in mlx5e_open_channels

Path csiph.com!feeder.erje.net!1.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH v2] net/mlx5e: avoid stack overflow in mlx5e_open_channels
Date Thu, 28 Apr 2016 22:50:03 +0200
Message-ID <rt12P-1W5-27@gated-at.bofh.it> (permalink)
References <rsdz4-1JO-9@gated-at.bofh.it>
X-Original-To arnd@arndb.de
X-Mailer Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
MIME-Version 1.0
Content-Type Text/Plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Greylist Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 28 Apr 2016 13:47:42 -0700 (PDT)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 21
Organization linux.* mail to news gateway
X-Original-Cc saeedm@mellanox.com, matanb@mellanox.com, leonro@mellanox.com, achiad@mellanox.com, ogerlitz@mellanox.com, amir@vadai.me, tariqt@mellanox.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
X-Original-Date Thu, 28 Apr 2016 16:47:40 -0400 (EDT)
X-Original-Message-ID <20160428.164740.1969113968588250026.davem@davemloft.net>
X-Original-References <1461685993-1049370-1-git-send-email-arnd@arndb.de>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1390508

Show key headers only | View raw


From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 26 Apr 2016 17:52:33 +0200

> 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 <arnd@arndb.de>
> Fixes: d3c9bc2743dc ("net/mlx5e: Added ICO SQs")
> ---
> v2: move allocation back into caller, as suggested by Saeed Mahameed

Applied, thanks Arnd.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v2] net/mlx5e: avoid stack overflow in  mlx5e_open_channels David Miller <davem@davemloft.net> - 2016-04-28 22:50 +0200

csiph-web