]> git.baikalelectronics.ru Git - kernel.git/commit
mlx5: Use refcount_t for refcount
authorChuhong Yuan <hslester96@gmail.com>
Tue, 6 Aug 2019 01:59:50 +0000 (09:59 +0800)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 7 Aug 2019 18:01:48 +0000 (11:01 -0700)
commit43d3195fa926e5c7d4bd90c77fea063a46b94418
tree5012c07d8fd3dcda85e4ee588d77332e6ab0d854
parentd343d3973e418a618a3040f1a59ae2342348dead
mlx5: Use refcount_t for refcount

Reference counters are preferred to use refcount_t instead of
atomic_t.
This is because the implementation of refcount_t can prevent
overflows and detect possible use-after-free.
So convert atomic_t ref counters to refcount_t.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/infiniband/hw/mlx5/srq_cmd.c
drivers/net/ethernet/mellanox/mlx5/core/qp.c
include/linux/mlx5/driver.h