mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	Wentao Liang <vulab@iscas.ac.cn>
Cc: ayush.sawal@chelsio.com, davem@davemloft.net, harsh@chelsio.com,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] crypto: chelsio - Fix wrcount leak in chcr_aes_decrypt()
Date: Fri, 6 Nov 2026 08:54:47 +0100	[thread overview]
Message-ID: <e34e5630-2f3e-4f7f-9f47-4fec11c1a61e@kernel.org> (raw)
In-Reply-To: <arNk6ujyrvTsFBfS@gondor.apana.org.au>

On 23/09/2026 07:34, Herbert Xu wrote:
> On Wed, Sep 16, 2026 at 09:23:59AM +0000, Wentao Liang wrote:
>> chcr_aes_decrypt() increments the device inflight count with
>> chcr_inc_wrcount() before building the work request, but it returns
>> early without dropping the count when the tx queue is full or when
>> process_cipher() fails and returns no skb. The count is only dropped
>> by the completion handlers, so every failed request permanently skews
>> the count and eventually blocks the device from being detached, with
>> the detach worker warning "CHCR:request Still Pending".
>>
>> Add an error label that calls chcr_dec_wrcount(), mirroring
>> chcr_aes_encrypt(), and jump to it on the failure paths.
>>
>> Fixes: fef4912b66d6 ("crypto: chelsio - Handle PCI shutdown event")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
>> ---
>>  drivers/crypto/chelsio/chcr_algo.c | 13 +++++++++----
>>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> Plesae combine this with the encrypt patch and repost.

After further discussions/postings it is likely that vulab@ is not a
real person, but a bot. It is also possible that it hides intentional
bugs among good looking patches, thus please be cautious and thoroughly
review the patch.

Best regards,
Krzysztof

      parent reply	other threads:[~2026-11-06  7:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16  9:23 Wentao Liang
2026-09-23  5:34 ` Herbert Xu
2026-11-06  7:38   ` [PATCH v2] crypto: chelsio - Fix wrcount leak in AES encrypt and decrypt Wentao Liang
2026-11-06  7:54   ` Krzysztof Kozlowski [this message]

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=e34e5630-2f3e-4f7f-9f47-4fec11c1a61e@kernel.org \
    --to=krzk@kernel.org \
    --cc=ayush.sawal@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=harsh@chelsio.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    /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

all inboxes | Powered by JetHome®