Dmitry Safonov b901a4e276 net/tcp_sigpool: Use kref_get_unless_zero()
The freeing and re-allocation of algorithm are protected by cpool_mutex,
so it doesn't fix an actual use-after-free, but avoids a deserved
refcount_warn_saturate() warning.

A trivial fix for the racy behavior.

Fixes: 8c73b26315aa ("net/tcp: Prepare tcp_md5sig_pool for TCP-AO")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-01 14:42:05 +00:00
..
2023-10-01 19:09:54 +01:00
2023-12-21 12:27:29 +01:00
2023-08-29 17:39:15 -07:00
2023-06-24 15:41:46 -07:00
2023-12-20 11:16:50 -08:00
2023-10-01 19:09:54 +01:00
2023-10-11 10:39:01 +01:00