aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index e5473c03d667..f6b620cdfb64 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1836,6 +1836,11 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
if (err < 0)
return err;
+ if (sock_flag(sk, SOCK_ZERO_ON_FREE)) {
+ pr_warn("zero_on_free af_unix sendmsg\n");
+ skb_memzero_on_free(skb);
+ }
+
err = -EOPNOTSUPP;
if (msg->msg_flags&MSG_OOB)
goto out_err;
@@ -2170,6 +2175,11 @@ static int unix_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
scm_recv(sock, msg, &scm, flags);
+ if (sock_flag(sk, SOCK_ZERO_ON_FREE)) {
+ pr_warn("zero_on_free af_unix\n");
+ skb_memzero_on_free(skb);
+ }
+
out_free:
skb_free_datagram(sk, skb);
mutex_unlock(&u->iolock);