tools: bpf_jit_disasm: check for klogctl failure
authorColin Ian King <colin.king@canonical.com>
Thu, 5 May 2016 22:39:33 +0000 (23:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 May 2016 03:32:59 +0000 (23:32 -0400)
commit25a54342fde903b6abc2680594cf3e4864686339
tree89be78b0f2e402ca1932aac7155ecea580f4560b
parent810810ffb2f6d46365d0790bbe77698a5534393a
tools: bpf_jit_disasm: check for klogctl failure

klogctl can fail and return -ve len, so check for this and
return NULL to avoid passing a (size_t)-1 to malloc.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/net/bpf_jit_disasm.c