Skip to content

Commit

Permalink
mptcp: fix bit MPTCP_PUSH_PENDING tests
Browse files Browse the repository at this point in the history
The MPTCP_PUSH_PENDING define is 6 and these tests should be testing if
BIT(6) is set.

Fixes: c2e6048 ("mptcp: fix race in release_cb")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Mar 13, 2021
1 parent b1dd9bf commit 2e5de7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2968,7 +2968,7 @@ static void mptcp_release_cb(struct sock *sk)
for (;;) {
flags = 0;
if (test_and_clear_bit(MPTCP_PUSH_PENDING, &mptcp_sk(sk)->flags))
flags |= MPTCP_PUSH_PENDING;
flags |= BIT(MPTCP_PUSH_PENDING);
if (!flags)
break;

Expand All @@ -2981,7 +2981,7 @@ static void mptcp_release_cb(struct sock *sk)
*/

spin_unlock_bh(&sk->sk_lock.slock);
if (flags & MPTCP_PUSH_PENDING)
if (flags & BIT(MPTCP_PUSH_PENDING))
__mptcp_push_pending(sk, 0);

cond_resched();
Expand Down

0 comments on commit 2e5de7e

Please sign in to comment.