The socket does not need to be relabeled on each send. Remove the code that does that. Signed-off-by: Casey Schaufler <casey@xxxxxxxxxxxxxxxx> --- security/smack/smack_lsm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index d2a73d8a6976..d9055a0df75c 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -2379,10 +2379,7 @@ static int smack_netlabel_send(struct sock *sk, struct sockaddr_in *sap) rc = smk_bu_note("IPv4 host check", skp, hkp, MAY_WRITE, rc); } rcu_read_unlock(); - if (rc != 0) - return rc; - - return smack_netlabel(sk); + return rc; } #if IS_ENABLED(CONFIG_IPV6) -- 2.17.0