projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67eb033
)
net: drop write-only stack variable
author
David Herrmann
<
[email protected]
>
Tue, 2 Feb 2016 17:17:54 +0000
(18:17 +0100)
committer
David S. Miller
<
[email protected]
>
Sun, 7 Feb 2016 19:06:26 +0000
(14:06 -0500)
Remove a write-only stack variable from unix_attach_fds(). This is a
left-over from the security fix in:
commit
712f4aad406bb1ed67f3f98d04c044191f0ff593
Author: willy tarreau <
[email protected]
>
Date: Sun Jan 10 07:54:56 2016 +0100
unix: properly account for FDs passed over unix sockets
Signed-off-by: David Herrmann <
[email protected]
>
Acked-by: Hannes Frederic Sowa <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/unix/af_unix.c
patch
|
blob
|
history
diff --git
a/net/unix/af_unix.c
b/net/unix/af_unix.c
index 49d5093eb0553a4416af09784b0e012f58cbd124..b3745557fc89b35703d683431336f6a6bf2e629f 100644
(file)
--- a/
net/unix/af_unix.c
+++ b/
net/unix/af_unix.c
@@
-1534,7
+1534,6
@@
static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
{
int i;
unsigned char max_level = 0;
- int unix_sock_count = 0;
if (too_many_unix_fds(current))
return -ETOOMANYREFS;
@@
-1542,11
+1541,9
@@
static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
for (i = scm->fp->count - 1; i >= 0; i--) {
struct sock *sk = unix_get_socket(scm->fp->fp[i]);
- if (sk) {
- unix_sock_count++;
+ if (sk)
max_level = max(max_level,
unix_sk(sk)->recursion_level);
- }
}
if (unlikely(max_level > MAX_RECURSION_LEVEL))
return -ETOOMANYREFS;