Re: [PATCH v3] mlx5: Use refcount_t for refcount

2019-08-07 Thread Saeed Mahameed
On Wed, 2019-08-07 at 06:17 +0300, Leon Romanovsky wrote: > On Tue, Aug 06, 2019 at 08:40:11PM +, Saeed Mahameed wrote: > > On Tue, 2019-08-06 at 09:59 +0800, Chuhong Yuan wrote: > > > Reference counters are preferred to use refcount_t instead of > > > atomic_t. > > > This is because the implem

Re: [PATCH v3] mlx5: Use refcount_t for refcount

2019-08-06 Thread Leon Romanovsky
On Tue, Aug 06, 2019 at 08:40:11PM +, Saeed Mahameed wrote: > On Tue, 2019-08-06 at 09:59 +0800, Chuhong Yuan wrote: > > 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

Re: [PATCH v3] mlx5: Use refcount_t for refcount

2019-08-06 Thread Saeed Mahameed
On Tue, 2019-08-06 at 09:59 +0800, Chuhong Yuan wrote: > 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. > > Si

[PATCH v3] mlx5: Use refcount_t for refcount

2019-08-05 Thread Chuhong Yuan
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 --- Changes in v3: - Merge v2 patches to