netfilter: nf_tables_offload: avoid excessive stack usage
authorArnd Bergmann <arnd@arndb.de>
Fri, 6 Sep 2019 15:12:30 +0000 (17:12 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 8 Sep 2019 16:16:59 +0000 (18:16 +0200)
commitb44492afd2b123f605c3aa2cbeee3398d9ebbcc5
treeb716b7c47ad504a5f4d0bbcaa21a476229611bf6
parentb74ae9618b15de8e9d5a08bc1fb2eeaf504986d4
netfilter: nf_tables_offload: avoid excessive stack usage

The nft_offload_ctx structure is much too large to put on the
stack:

net/netfilter/nf_tables_offload.c:31:23: error: stack frame size of 1200 bytes in function 'nft_flow_rule_create' [-Werror,-Wframe-larger-than=]

Use dynamic allocation here, as we do elsewhere in the same
function.

Fixes: c9626a2cbdb2 ("netfilter: nf_tables: add hardware offload support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_offload.c