Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1563776
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] qed: avoid possible stack overflow in qed_ll2_acquire_connection |
| Date | 2017-01-20 17:50 +0100 |
| Message-ID | <t1KxX-1do-11@gated-at.bofh.it> (permalink) |
| References | <t0ZSq-5mL-7@gated-at.bofh.it> <t0ZSp-5mL-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/3] qed: avoid possible stack overflow in qed_ll2_acquire_connection Arnd Bergmann <arnd@arndb.de> - 2017-01-18 16:00 +0100 RE: [PATCH 2/3] qed: avoid possible stack overflow in qed_ll2_acquire_connection "Mintz, Yuval" <Yuval.Mintz@cavium.com> - 2017-01-19 14:20 +0100 Re: [PATCH 2/3] qed: avoid possible stack overflow in qed_ll2_acquire_connection David Miller <davem@davemloft.net> - 2017-01-20 17:50 +0100
csiph-web