aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/scm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/scm.c b/net/core/scm.c
index b7ba91b074b3..9b264634acfd 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -156,6 +156,8 @@ int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p)
156 switch (cmsg->cmsg_type) 156 switch (cmsg->cmsg_type)
157 { 157 {
158 case SCM_RIGHTS: 158 case SCM_RIGHTS:
159 if (!sock->ops || sock->ops->family != PF_UNIX)
160 goto error;
159 err=scm_fp_copy(cmsg, &p->fp); 161 err=scm_fp_copy(cmsg, &p->fp);
160 if (err<0) 162 if (err<0)
161 goto error; 163 goto error;