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)
sk_for_each(osk, node, head) {
if (nlk_sk(osk)->pid == pid) {
/* Bind collision, search negative pid values. */
if (pid > 0)
pid = rover;
else if (--pid > 0)
pid = -4097;
pid = rover--;
if (rover > -4097)
rover = -4097;
netlink_table_ungrab();
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