aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/cyc_complexity_plugin.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <[email protected]>2021-09-23 17:05:03 +0000
committerCasey Schaufler <[email protected]>2021-09-24 20:14:49 +0000
commit222a96b31c242d6736868da679d8c733719a3716 (patch)
tree2c84de47fbad8f78aa16c07fbe244a4341a9de37 /scripts/gcc-plugins/cyc_complexity_plugin.c
parentsmackfs: Fix use-after-free in netlbl_catmap_walk() (diff)
downloadkernel-222a96b31c242d6736868da679d8c733719a3716.tar.gz
kernel-222a96b31c242d6736868da679d8c733719a3716.zip
smack: Guard smack_ipv6_lock definition within a SMACK_IPV6_PORT_LABELING block
The mutex smack_ipv6_lock is only used with the SMACK_IPV6_PORT_LABELING block but its definition is outside of the block. This leads to a defined-but-not-used warning on PREEMPT_RT. Moving smack_ipv6_lock down to the block where it is used where it used raises the question why is smk_ipv6_port_list read if nothing is added to it. Turns out, only smk_ipv6_port_check() is using it outside of an ifdef SMACK_IPV6_PORT_LABELING block. However two of three caller invoke smk_ipv6_port_check() from a ifdef block and only one is using __is_defined() macro which requires the function and smk_ipv6_port_list to be around. Put the lock and list inside an ifdef SMACK_IPV6_PORT_LABELING block to avoid the warning regarding unused mutex. Extend the ifdef-block to also cover smk_ipv6_port_check(). Make smack_socket_connect() use ifdef instead of __is_defined() to avoid complains about missing function. Cc: Casey Schaufler <[email protected]> Cc: James Morris <[email protected]> Cc: "Serge E. Hallyn" <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Casey Schaufler <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions