Re: [PATCH] SUNRPC: Convert rpc_client refcount to use refcount_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Trond,

On 17 Jul 2021, at 13:20, trondmy@xxxxxxxxxx wrote:

> @@ -943,7 +941,7 @@ rpc_release_client(struct rpc_clnt *clnt)
>  	do {
>  		if (list_empty(&clnt->cl_tasks))
>  			wake_up(&destroy_wait);
> -		if (!atomic_dec_and_test(&clnt->cl_count))
> +		if (refcount_dec_not_one(&clnt->cl_count))

I guess we're not worried about extra calls racing into rpc_free_auth?

.. hmm, it looks like current code can do that already since we're bumping the
ref up again.  Seems like we could end up in rpcauth_release twice with
an underflow on au_count.

Ben




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux