diff options
Diffstat (limited to 'net/core/scm.c')
-rw-r--r-- | net/core/scm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/core/scm.c b/net/core/scm.c index 271cf060ef8c..292ad8d5ad76 100644 --- a/net/core/scm.c +++ b/net/core/scm.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Only allow a user to send credentials, that they could set with | 39 | * Only allow a user to send credentials, that they could set with |
40 | * setu(g)id. | 40 | * setu(g)id. |
41 | */ | 41 | */ |
42 | 42 | ||
@@ -79,11 +79,11 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp) | |||
79 | 79 | ||
80 | if (fpl->count + num > SCM_MAX_FD) | 80 | if (fpl->count + num > SCM_MAX_FD) |
81 | return -EINVAL; | 81 | return -EINVAL; |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Verify the descriptors and increment the usage count. | 84 | * Verify the descriptors and increment the usage count. |
85 | */ | 85 | */ |
86 | 86 | ||
87 | for (i=0; i< num; i++) | 87 | for (i=0; i< num; i++) |
88 | { | 88 | { |
89 | int fd = fdp[i]; | 89 | int fd = fdp[i]; |
@@ -123,7 +123,7 @@ int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p) | |||
123 | /* The first check was omitted in <= 2.2.5. The reasoning was | 123 | /* The first check was omitted in <= 2.2.5. The reasoning was |
124 | that parser checks cmsg_len in any case, so that | 124 | that parser checks cmsg_len in any case, so that |
125 | additional check would be work duplication. | 125 | additional check would be work duplication. |
126 | But if cmsg_level is not SOL_SOCKET, we do not check | 126 | But if cmsg_level is not SOL_SOCKET, we do not check |
127 | for too short ancillary data object at all! Oops. | 127 | for too short ancillary data object at all! Oops. |
128 | OK, let's add it... | 128 | OK, let's add it... |
129 | */ | 129 | */ |
@@ -159,7 +159,7 @@ int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p) | |||
159 | p->fp = NULL; | 159 | p->fp = NULL; |
160 | } | 160 | } |
161 | return 0; | 161 | return 0; |
162 | 162 | ||
163 | error: | 163 | error: |
164 | scm_destroy(p); | 164 | scm_destroy(p); |
165 | return err; | 165 | return err; |
@@ -189,7 +189,7 @@ int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data) | |||
189 | 189 | ||
190 | err = -EFAULT; | 190 | err = -EFAULT; |
191 | if (copy_to_user(cm, &cmhdr, sizeof cmhdr)) | 191 | if (copy_to_user(cm, &cmhdr, sizeof cmhdr)) |
192 | goto out; | 192 | goto out; |
193 | if (copy_to_user(CMSG_DATA(cm), data, cmlen - sizeof(struct cmsghdr))) | 193 | if (copy_to_user(CMSG_DATA(cm), data, cmlen - sizeof(struct cmsghdr))) |
194 | goto out; | 194 | goto out; |
195 | cmlen = CMSG_SPACE(len); | 195 | cmlen = CMSG_SPACE(len); |