Re: [PATCH v8 2/3] s390/crypto: New s390 specific protected key hash phmac

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

 



On Wed, Dec 18, 2024 at 03:05:28PM +0100, Harald Freudenberger wrote:
>
> +static void phmac_wq_init_fn(struct work_struct *work)
> +{
> +	struct delayed_work *dwork = to_delayed_work(work);
> +	struct s390_phmac_req_ctx *req_ctx =
> +		container_of(dwork, struct s390_phmac_req_ctx, work);
> +	struct ahash_request *req = req_ctx->req;
> +	struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
> +	struct s390_kmac_sha2_ctx *ctx = &req_ctx->sha2_ctx;
> +	int rc;
> +
> +	rc = phmac_init(tfm, ctx, true);
> +
> +	pr_debug("req complete with rc=%d\n", rc);
> +	crypto_request_complete(&req->base, rc);

This should be ahash_request_complete, and you should also call
local_bh_disable before calling it.

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux