diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-04-05 06:56:47 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-04-05 06:56:47 -0400 |
commit | 6ea7e3873e52902af9ee8c0837450fdb69d54140 (patch) | |
tree | b291dad174446387a166763cfbf3dd351148ecbe /net/unix | |
parent | 5ddfe0858ea7848c5d4efe3f4319e7543522e0ee (diff) | |
parent | f55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff) |
Merge branch 'fixes-base' into fixes
Diffstat (limited to 'net/unix')
-rw-r--r-- | net/unix/af_unix.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index f75f847e688d..8269da73e9e5 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; |