Re: [PATCH net] rds: fix refcount bug in rds_sock_addref
From: David Miller <davem@davemloft.net>
Date: 2019-01-31 17:46:22
From: David Miller <davem@davemloft.net>
Date: 2019-01-31 17:46:22
From: Eric Dumazet <edumazet@google.com> Date: Thu, 31 Jan 2019 08:47:10 -0800
syzbot was able to catch a bug in rds [1] The issue here is that the socket might be found in a hash table but that its refcount has already be set to 0 by another cpu. We need to use refcount_inc_not_zero() to be safe here.
...
Fixes: cc4dfb7f70a3 ("rds: fix two RCU related problems")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <redacted>Applied and queued up for -stable, thanks Eric.