]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: sockmap state change warning fix
authorJohn Fastabend <john.fastabend@gmail.com>
Wed, 16 Aug 2017 22:02:12 +0000 (15:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Aug 2017 22:34:13 +0000 (15:34 -0700)
commite549ad7ee7e1ed7d83c191353743697a0becc750
treebeb2cb4c505c1164b06db372da24c208dec59873
parente4f3c3af322aebbca8f5a9a0c3b929ad593c679b
bpf: sockmap state change warning fix

psock will uninitialized in default case we need to do the same psock lookup
and check as in other branch. Fixes compile warning below.

kernel/bpf/sockmap.c: In function ‘smap_state_change’:
kernel/bpf/sockmap.c:156:21: warning: ‘psock’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  struct smap_psock *psock;

Fixes: 26ac83c2c880 ("bpf: sockmap with sk redirect support")
Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/sockmap.c