path: root/include/net/sock.h
diff options
authorArnaldo Carvalho de Melo <>2017-03-01 16:35:08 -0300
committerDavid S. Miller <>2017-03-02 13:19:33 -0800
commit94352d45092c23874532221b4d1e4721df9d63df (patch)
tree4962d392f77f9afe5fad1f5dc5eca4bd99ff651d /include/net/sock.h
parentd5afb6f9b6bb2c57bd0c05e76e12489dc0d037d9 (diff)
net: Introduce sk_clone_lock() error path routine
When handling problems in cloning a socket with the sk_clone_locked() function we need to perform several steps that were open coded in it and its callers, so introduce a routine to avoid this duplication: sk_free_unlock_clone(). Cc: Cong Wang <> Cc: Dmitry Vyukov <> Cc: Eric Dumazet <> Cc: Gerrit Renker <> Cc: Thomas Gleixner <> Link: Signed-off-by: Arnaldo Carvalho de Melo <> Signed-off-by: David S. Miller <>
Diffstat (limited to 'include/net/sock.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 9ccefa5..5e59976 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1526,6 +1526,7 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
void sk_free(struct sock *sk);
void sk_destruct(struct sock *sk);
struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority);
+void sk_free_unlock_clone(struct sock *sk);
struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force,
gfp_t priority);