diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-09-07 16:44:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-11 16:09:59 -0400 |
commit | a0fb05d1aef0f5df936f80b726d1b3bfd4275f95 (patch) | |
tree | 29178d41dccf5ee935c06b059e6f38add386742f /net/ipv6/icmp.c | |
parent | ae7b4e1f213aa659aedf9c6ecad0bf5f0476e1e2 (diff) | |
download | blackbird-op-linux-a0fb05d1aef0f5df936f80b726d1b3bfd4275f95.tar.gz blackbird-op-linux-a0fb05d1aef0f5df936f80b726d1b3bfd4275f95.zip |
net: sctp: fix bug in sctp_poll for SOCK_SELECT_ERR_QUEUE
If we do not add braces around ...
mask |= POLLERR |
sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0;
... then this condition always evaluates to true as POLLERR is
defined as 8 and binary or'd with whatever result comes out of
sock_flag(). Hence instead of (X | Y) ? A : B, transform it into
X | (Y ? A : B). Unfortunatelty, commit 8facd5fb73 ("net: fix
smatch warnings inside datagram_poll") forgot about SCTP. :-(
Introduced by 7d4c04fc170 ("net: add option to enable error queue
packets waking select").
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/icmp.c')
0 files changed, 0 insertions, 0 deletions