aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net
diff options
context:
space:
mode:
authorFerenc Fejes <fejes@inf.elte.hu>2020-05-30 23:09:00 +0200
committerAlexei Starovoitov <ast@kernel.org>2020-06-01 14:57:14 -0700
commit8ea204c2b658eaef55b4716fde469fb66c589a3d (patch)
treedc158cbccc05c8a068e015ada9d29d4f0a9d42c4 /include/net
parentbpf: Change kvfree to kfree in generic_map_lookup_batch() (diff)
downloadwireguard-linux-8ea204c2b658eaef55b4716fde469fb66c589a3d.tar.xz
wireguard-linux-8ea204c2b658eaef55b4716fde469fb66c589a3d.zip
net: Make locking in sock_bindtoindex optional
The sock_bindtoindex intended for kernel wide usage however it will lock the socket regardless of the context. This modification relax this behavior optionally: locking the socket will be optional by calling the sock_bindtoindex with lock_sk = true. The modification applied to all users of the sock_bindtoindex. Signed-off-by: Ferenc Fejes <fejes@inf.elte.hu> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/bee6355da40d9e991b2f2d12b67d55ebb5f5b207.1590871065.git.fejes@inf.elte.hu
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 6e9f713a7860..c53cc42b5ab9 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2690,7 +2690,7 @@ static inline bool sk_dev_equal_l3scope(struct sock *sk, int dif)
void sock_def_readable(struct sock *sk);
-int sock_bindtoindex(struct sock *sk, int ifindex);
+int sock_bindtoindex(struct sock *sk, int ifindex, bool lock_sk);
void sock_enable_timestamps(struct sock *sk);
void sock_no_linger(struct sock *sk);
void sock_set_keepalive(struct sock *sk);