summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-12 21:30:16 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-16 08:42:21 -0700
commitc4eb62da6f34bfa9bbcbd005210a90fdfca7e367 (patch)
tree5a6690fb22490afe0e90a181f9476cffa8717d81 /include
parent952b0e42f8f8c7c316491d0cbf9c0d41ad4d3838 (diff)
Revert: "crypto: af_alg - Disallow bind/setkey/... after accept(2)"
This reverts commit 06b4194533ff92ed5888840e3a6beaf29a8fe5d4 which is commit c840ac6af3f8713a71b4d2363419145760bd6044 upstream. It's been widely reported that this patch breaks existing userspace applications when backported to the stable kernel releases. As no fix seems to be forthcoming, just revert it to let systems work again. Reported-by: "J. Paul Reed" <preed@sigkill.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/crypto/if_alg.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h
index 2f38daaab3d7..d61c11170213 100644
--- a/include/crypto/if_alg.h
+++ b/include/crypto/if_alg.h
@@ -30,8 +30,6 @@ struct alg_sock {
struct sock *parent;
- unsigned int refcnt;
-
const struct af_alg_type *type;
void *private;
};
@@ -66,7 +64,6 @@ int af_alg_register_type(const struct af_alg_type *type);
int af_alg_unregister_type(const struct af_alg_type *type);
int af_alg_release(struct socket *sock);
-void af_alg_release_parent(struct sock *sk);
int af_alg_accept(struct sock *sk, struct socket *newsock);
int af_alg_make_sg(struct af_alg_sgl *sgl, void __user *addr, int len,
@@ -83,6 +80,11 @@ static inline struct alg_sock *alg_sk(struct sock *sk)
return (struct alg_sock *)sk;
}
+static inline void af_alg_release_parent(struct sock *sk)
+{
+ sock_put(alg_sk(sk)->parent);
+}
+
static inline void af_alg_init_completion(struct af_alg_completion *completion)
{
init_completion(&completion->completion);