]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: bpf: test_sockmap: handle file creation failures gracefully
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 27 Nov 2019 20:16:45 +0000 (12:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2019 21:34:25 +0000 (22:34 +0100)
commit7ba0f92bbb395d2de20a7e898c03284ba70bb516
tree0a5335f809b0610ce5e81c6609151fd9f9fc6357
parent33627d93d75702c70c898441602dbfba03e0f4cc
selftests: bpf: test_sockmap: handle file creation failures gracefully

[ Upstream commit 4b67c515036313f3c3ecba3cb2babb9cbddb3f85 ]

test_sockmap creates a temporary file to use for sendpage.
this may fail for various reasons. Handle the error rather
than segfault.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/bpf/test_sockmap.c