[79/90] Smack: Don't set the socket label on each send
diff mbox series

Message ID 20190419004617.64627-80-casey@schaufler-ca.com
State Not Applicable
Headers show
Series
  • LSM: Module stacking for all
Related show

Commit Message

Casey Schaufler April 19, 2019, 12:46 a.m. UTC
The socket does not need to be relabeled on each send.
Remove the code that does that.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
---
 security/smack/smack_lsm.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index ace5b48f90dc..25b5160e343b 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -2466,10 +2466,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)