Commit 22402e99 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[NETLINK]: Fix pid rover code.

I'm not setting the rover pointer at all.  Here's a patch to
fix that.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7c935ae5
...@@ -424,10 +424,9 @@ static int netlink_autobind(struct socket *sock) ...@@ -424,10 +424,9 @@ static int netlink_autobind(struct socket *sock)
sk_for_each(osk, node, head) { sk_for_each(osk, node, head) {
if (nlk_sk(osk)->pid == pid) { if (nlk_sk(osk)->pid == pid) {
/* Bind collision, search negative pid values. */ /* Bind collision, search negative pid values. */
if (pid > 0) pid = rover--;
pid = rover; if (rover > -4097)
else if (--pid > 0) rover = -4097;
pid = -4097;
netlink_table_ungrab(); netlink_table_ungrab();
goto retry; goto retry;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment