netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Srujana Challa <schalla@marvell.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	linux-crypto@vger.kernel.org, schandran@marvell.com,
	pathreya@marvell.com, sgoutham@marvell.com, lcherian@marvell.com,
	gakula@marvell.com, jerinj@marvell.com
Subject: Re: [PATCH v2 3/3] drivers: crypto: add the Virtual Function driver for OcteonTX2 CPT
Date: Thu, 13 Aug 2020 10:58:59 +1000	[thread overview]
Message-ID: <20200813005859.GC24593@gondor.apana.org.au> (raw)
In-Reply-To: <1596809360-12597-4-git-send-email-schalla@marvell.com>

On Fri, Aug 07, 2020 at 07:39:20PM +0530, Srujana Challa wrote:
>
> +static inline int is_any_alg_used(void)
> +{
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(otx2_cpt_skciphers); i++)
> +		if (refcount_read(&otx2_cpt_skciphers[i].base.cra_refcnt) != 1)
> +			return true;
> +	for (i = 0; i < ARRAY_SIZE(otx2_cpt_aeads); i++)
> +		if (refcount_read(&otx2_cpt_aeads[i].base.cra_refcnt) != 1)
> +			return true;
> +	return false;
> +}

This is racy as there is nothing stopping new users from coming in
after you've finished the test.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2020-08-13  0:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07 14:09 [PATCH v2 0/3] Add Support for Marvell OcteonTX2 Cryptographic Srujana Challa
2020-08-07 14:09 ` [PATCH v2 1/3] octeontx2-af: add support to manage the CPT unit Srujana Challa
2020-08-07 14:09 ` [PATCH v2 2/3] drivers: crypto: add support for OCTEONTX2 CPT engine Srujana Challa
2020-08-07 15:24   ` Jakub Kicinski
2020-08-13  0:51   ` Herbert Xu
2020-08-13  0:54   ` Herbert Xu
2020-09-04 13:45     ` Srujana Challa
2020-09-04 13:50       ` Herbert Xu
2020-09-04 14:14         ` [EXT] " Srujana Challa
2020-09-04 14:17           ` Herbert Xu
2020-09-04 16:36             ` Sunil Kovvuri Goutham
2020-09-04 18:38               ` Andrew Lunn
2020-09-08 14:20                 ` Srujana Challa
2020-08-07 14:09 ` [PATCH v2 3/3] drivers: crypto: add the Virtual Function driver for OcteonTX2 CPT Srujana Challa
2020-08-13  0:58   ` Herbert Xu [this message]
2020-08-08  0:17 ` [PATCH v2 0/3] Add Support for Marvell OcteonTX2 Cryptographic David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200813005859.GC24593@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=gakula@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=lcherian@marvell.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pathreya@marvell.com \
    --cc=schalla@marvell.com \
    --cc=schandran@marvell.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).