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-05-31 13:06:57 +02:00
2023-10-25 10:38:07 +01:00
2021-05-17 15:29:35 -07:00
2023-04-13 16:43:38 -07:00
2023-10-16 21:05:33 -07:00
2021-05-17 15:29:35 -07:00
2023-11-03 09:16:42 +00:00
2022-12-20 03:13:45 +01:00
2021-05-17 15:29:35 -07:00
2023-10-30 14:36:57 -07:00
2023-09-14 16:16:36 +02:00
2023-08-29 17:39:15 -07:00