diff options
| author | Arnd Bergmann <[email protected]> | 2020-04-29 21:00:41 +0200 |
|---|---|---|
| committer | Pablo Neira Ayuso <[email protected]> | 2020-04-29 21:17:57 +0200 |
| commit | c165d57b552aaca607fa5daf3fb524a6efe3c5a3 (patch) | |
| tree | cb7007f33e04965077d04e6df65b3829cded2d2b /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | ea64d8d6c675c0bb712689b13810301de9d8f77a (diff) | |
netfilter: nf_osf: avoid passing pointer to local var
gcc-10 points out that a code path exists where a pointer to a stack
variable may be passed back to the caller:
net/netfilter/nfnetlink_osf.c: In function 'nf_osf_hdr_ctx_init':
cc1: warning: function may return address of local variable [-Wreturn-local-addr]
net/netfilter/nfnetlink_osf.c:171:16: note: declared here
171 | struct tcphdr _tcph;
| ^~~~~
I am not sure whether this can happen in practice, but moving the
variable declaration into the callers avoids the problem.
Fixes: 31a9c29210e2 ("netfilter: nf_osf: add struct nf_osf_hdr_ctx")
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Florian Westphal <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions