aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/c++/clang.cpp
diff options
context:
space:
mode:
authorChristoph Jaeger <[email protected]>2015-01-11 13:01:16 -0500
committerDavid S. Miller <[email protected]>2015-01-11 21:54:03 -0500
commit46d2cfb192b30d729aef064808ed5ece47cee369 (patch)
tree94a98b40912ad217baaf9a462f56db788a91e4ed /tools/perf/util/c++/clang.cpp
parent7a05dc64e2e4c611d89007b125b20c0d2a4d31a5 (diff)
packet: bail out of packet_snd() if L2 header creation fails
Due to a misplaced parenthesis, the expression (unlikely(offset) < 0), which expands to (__builtin_expect(!!(offset), 0) < 0), never evaluates to true. Therefore, when sending packets with PF_PACKET/SOCK_DGRAM, packet_snd() does not abort as intended if the creation of the layer 2 header fails. Spotted by Coverity - CID 1259975 ("Operands don't affect result"). Fixes: 9c7077622dd9 ("packet: make packet_snd fail on len smaller than l2 header") Signed-off-by: Christoph Jaeger <[email protected]> Acked-by: Eric Dumazet <[email protected]> Acked-by: Willem de Bruijn <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/util/c++/clang.cpp')
0 files changed, 0 insertions, 0 deletions