Skip to content

Commit ab83924

Browse files
committed
sparse: some pm_netlink helpers are being moved
mptcp_pm_create_subflow_or_signal_addr and mptcp_pm_nl_add_addr_received helpers have sparse false positive. They are being moved to pm_kernel.c [1]. While at it, move the two similar warnings on one line. Link: https://lore.kernel.org/[email protected] [1] Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent 7a035ff commit ab83924

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,11 +493,11 @@ check_sparse_output() { local src warn
493493
return 0
494494
fi
495495
;;
496-
"net/mptcp/pm_netlink.c")
496+
"net/mptcp/pm_"*".c")
497+
# These functions have been moved to pm_kernel.c
497498
# net/mptcp/pm_netlink.c:507:25: warning: context imbalance in 'mptcp_pm_create_subflow_or_signal_addr' - unexpected unlock
498499
# net/mptcp/pm_netlink.c:622:23: warning: context imbalance in 'mptcp_pm_nl_add_addr_received' - unexpected unlock
499-
if [ "$(echo "${warn}" | grep -cE "net/mptcp/pm_netlink.c:[0-9]+:[0-9]+: warning: context imbalance in 'mptcp_pm_create_subflow_or_signal_addr' - unexpected unlock")" -eq 1 ] || \
500-
[ "$(echo "${warn}" | grep -cE "net/mptcp/pm_netlink.c:[0-9]+:[0-9]+: warning: context imbalance in 'mptcp_pm_nl_add_addr_received' - unexpected unlock")" -eq 1 ]; then
500+
if [ "$(echo "${warn}" | grep -cE "net/mptcp/pm_(netlink|kernel).c:[0-9]+:[0-9]+: warning: context imbalance in '(mptcp_pm_create_subflow_or_signal_addr|mptcp_pm_nl_add_addr_received)' - unexpected unlock")" -eq 1 ]; then
501501
print_info "Ignore the following warning because sparse seems fooled with the for-loop inside the unlocked part: ${warn}"
502502
return 0
503503
fi

0 commit comments

Comments
 (0)