Skip to content

Commit 2e5de7e

Browse files
Dan Carpenterdavem330
authored andcommitted
mptcp: fix bit MPTCP_PUSH_PENDING tests
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>
1 parent b1dd9bf commit 2e5de7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/mptcp/protocol.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,7 +2968,7 @@ static void mptcp_release_cb(struct sock *sk)
29682968
for (;;) {
29692969
flags = 0;
29702970
if (test_and_clear_bit(MPTCP_PUSH_PENDING, &mptcp_sk(sk)->flags))
2971-
flags |= MPTCP_PUSH_PENDING;
2971+
flags |= BIT(MPTCP_PUSH_PENDING);
29722972
if (!flags)
29732973
break;
29742974

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

29832983
spin_unlock_bh(&sk->sk_lock.slock);
2984-
if (flags & MPTCP_PUSH_PENDING)
2984+
if (flags & BIT(MPTCP_PUSH_PENDING))
29852985
__mptcp_push_pending(sk, 0);
29862986

29872987
cond_resched();

0 commit comments

Comments
 (0)