From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
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
Subject: Re: [PATCH v2] net/mlx5e: avoid stack overflow in mlx5e_open_channels
Date: Thu, 28 Apr 2016 16:47:40 -0400 (EDT) [thread overview]
Message-ID: <20160428.164740.1969113968588250026.davem@davemloft.net> (raw)
In-Reply-To: <1461685993-1049370-1-git-send-email-arnd@arndb.de>
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.
prev parent reply other threads:[~2016-04-28 20:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 15:52 [PATCH v2] net/mlx5e: avoid stack overflow in mlx5e_open_channels Arnd Bergmann
[not found] ` <1461685993-1049370-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-04-26 18:52 ` Saeed Mahameed
2016-04-28 20:47 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160428.164740.1969113968588250026.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=achiad@mellanox.com \
--cc=amir@vadai.me \
--cc=arnd@arndb.de \
--cc=leonro@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=matanb@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=saeedm@mellanox.com \
--cc=tariqt@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox