Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3481
b: refs/heads/master
c: d470e3b
h: refs/heads/master
i:
  3479: d9d8884
v: v3
  • Loading branch information
David S. Miller committed Jun 26, 2005
1 parent df52b51 commit 1c1cb74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 32e9e25ef20789c24ffa1f41489a13932cf82c77
refs/heads/master: d470e3b483dcf79c16463bc740738dca76a035a9
11 changes: 8 additions & 3 deletions trunk/net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ static int netlink_insert(struct sock *sk, u32 pid)
static void netlink_remove(struct sock *sk)
{
netlink_table_grab();
nl_table[sk->sk_protocol].hash.entries--;
sk_del_node_init(sk);
if (sk_del_node_init(sk))
nl_table[sk->sk_protocol].hash.entries--;
if (nlk_sk(sk)->groups)
__sk_del_bind_node(sk);
netlink_table_ungrab();
Expand Down Expand Up @@ -429,7 +429,12 @@ static int netlink_autobind(struct socket *sock)
err = netlink_insert(sk, pid);
if (err == -EADDRINUSE)
goto retry;
return 0;

/* If 2 threads race to autobind, that is fine. */
if (err == -EBUSY)
err = 0;

return err;
}

static inline int netlink_capable(struct socket *sock, unsigned int flag)
Expand Down

0 comments on commit 1c1cb74

Please sign in to comment.