]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: sockmap, fix uninitialized variable
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Thu, 17 May 2018 14:08:43 +0000 (09:08 -0500)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 17 May 2018 20:44:43 +0000 (22:44 +0200)
commit0f23af79c49d946b1a14fa43dec277914a75aade
tree75aa53c02f8f25eeab940f3e62ae5fb779bd8704
parentb6181d33cb38f0a1516be5d935f28e63199cfd1f
bpf: sockmap, fix uninitialized variable

There is a potential execution path in which variable err is
returned without being properly initialized previously.

Fix this by initializing variable err to 0.

Addresses-Coverity-ID: 1468964 ("Uninitialized scalar variable")
Fixes: 2246965e6b02 ("bpf: sockmap, refactor sockmap routines to work with hashmap")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/sockmap.c