From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: Yuval.Mintz@cavium.com, Ariel.Elior@cavium.com,
everest-linux-l2@cavium.com, Ram.Amrani@cavium.com,
weiyongjun1@huawei.com, hare@suse.de, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] qed: avoid possible stack overflow in qed_ll2_acquire_connection
Date: Fri, 20 Jan 2017 11:44:55 -0500 (EST) [thread overview]
Message-ID: <20170120.114455.431685285744854397.davem@davemloft.net> (raw)
In-Reply-To: <20170118145306.1004008-2-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 18 Jan 2017 15:52:52 +0100
> struct qed_ll2_info is rather large, so putting it on the stack
> can cause an overflow, as this warning tries to tell us:
>
> drivers/net/ethernet/qlogic/qed/qed_ll2.c: In function 'qed_ll2_start':
> drivers/net/ethernet/qlogic/qed/qed_ll2.c:2159:1: error: the frame size of 1056 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
>
> qed_ll2_start_ooo() already uses a dynamic allocation for the structure
> to work around that problem, and we could do the same in qed_ll2_start()
> as well as qed_roce_ll2_start(), but since the structure is only
> used to pass a couple of initialization values here, it seems nicer
> to replace it with a different structure.
>
> Lacking any idea for better naming, I'm adding 'struct qed_ll2_conn',
> which now contains all the initialization data, and this now simply
> gets copied into struct qed_ll2_info rather than assigning all members
> one by one.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied.
next prev parent reply other threads:[~2017-01-20 16:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 14:52 [PATCH 1/3] cxgb4: hide unused warnings Arnd Bergmann
2017-01-18 14:52 ` [PATCH 2/3] qed: avoid possible stack overflow in qed_ll2_acquire_connection Arnd Bergmann
2017-01-19 13:13 ` Mintz, Yuval
2017-01-20 16:44 ` David Miller [this message]
2017-01-18 14:52 ` [PATCH 3/3] bcm63xx_enet: avoid uninitialized variable warning Arnd Bergmann
2017-01-20 16:46 ` David Miller
2017-01-20 16:15 ` [PATCH 1/3] cxgb4: hide unused warnings David Miller
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=20170120.114455.431685285744854397.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Ariel.Elior@cavium.com \
--cc=Ram.Amrani@cavium.com \
--cc=Yuval.Mintz@cavium.com \
--cc=arnd@arndb.de \
--cc=everest-linux-l2@cavium.com \
--cc=hare@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=weiyongjun1@huawei.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;
as well as URLs for NNTP newsgroup(s).