summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/unix/af_unix.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 49d5093eb055..b3745557fc89 100644
--- 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)
1534{ 1534{
1535 int i; 1535 int i;
1536 unsigned char max_level = 0; 1536 unsigned char max_level = 0;
1537 int unix_sock_count = 0;
1538 1537
1539 if (too_many_unix_fds(current)) 1538 if (too_many_unix_fds(current))
1540 return -ETOOMANYREFS; 1539 return -ETOOMANYREFS;
@@ -1542,11 +1541,9 @@ static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
1542 for (i = scm->fp->count - 1; i >= 0; i--) { 1541 for (i = scm->fp->count - 1; i >= 0; i--) {
1543 struct sock *sk = unix_get_socket(scm->fp->fp[i]); 1542 struct sock *sk = unix_get_socket(scm->fp->fp[i]);
1544 1543
1545 if (sk) { 1544 if (sk)
1546 unix_sock_count++;
1547 max_level = max(max_level, 1545 max_level = max(max_level,
1548 unix_sk(sk)->recursion_level); 1546 unix_sk(sk)->recursion_level);
1549 }
1550 } 1547 }
1551 if (unlikely(max_level > MAX_RECURSION_LEVEL)) 1548 if (unlikely(max_level > MAX_RECURSION_LEVEL))
1552 return -ETOOMANYREFS; 1549 return -ETOOMANYREFS;