diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-06-19 03:25:08 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-06-19 03:25:08 +0300 |
commit | 6ea24cf79e055f0a62a64baa8587e2254a493c7b (patch) | |
tree | c5cd6113ed93854b1bc30cd471c366f080c4be2f /net/unix/af_unix.c | |
parent | 540c26087bfbad6ea72758b76b16ae6282a73fea (diff) | |
parent | 488326947cd1f038da8d2c9068a0d07b913b7983 (diff) | |
download | linux-6ea24cf79e055f0a62a64baa8587e2254a493c7b.tar.xz |
Merge branch 'cec-defines' into for-linus
Let's bring in HDMI CEC defines to ease merging CEC support in the next
merge window.
Diffstat (limited to 'net/unix/af_unix.c')
-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) { 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; |