• Herbert Xu's avatar
    netlink: Use random autobind rover · b9fbe709
    Herbert Xu authored
    Currently we use a global rover to select a port ID that is unique.
    This used to work consistently when it was protected with a global
    lock.  However as we're now lockless, the global rover can exhibit
    pathological behaviour should multiple threads all stomp on it at
    the same time.
    
    Granted this will eventually resolve itself but the process is
    suboptimal.
    
    This patch replaces the global rover with a pseudorandom starting
    point to avoid this issue.
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b9fbe709
af_netlink.c 74.6 KB