Skip to content
Commit c951a1ee authored by Xiang Yang's avatar Xiang Yang Committed by Greg Kroah-Hartman
Browse files

mptcp: fix the incorrect judgment for msk->cb_flags

commit 17ebf8a4 upstream.

Coccicheck reports the error below:
net/mptcp/protocol.c:3330:15-28: ERROR: test of a variable/field address

Since the address of msk->cb_flags is used in __test_and_clear_bit, the
address should not be NULL. The judgment for if (unlikely(msk->cb_flags))
will always be true, we should check the real value of msk->cb_flags here.

Fixes: 65a569b0

 ("mptcp: optimize release_cb for the common case")
Signed-off-by: default avatarXiang Yang <xiangyang3@huawei.com>
Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
Link: https://lore.kernel.org/r/20230803072438.1847500-1-xiangyang3@huawei.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 019928ce
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment