From patchwork Fri Jun 9 13:18:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xianting Tian X-Patchwork-Id: 13273948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB73CC7EE25 for ; Fri, 9 Jun 2023 13:18:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241299AbjFINSt (ORCPT ); Fri, 9 Jun 2023 09:18:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240335AbjFINSk (ORCPT ); Fri, 9 Jun 2023 09:18:40 -0400 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16A513596; Fri, 9 Jun 2023 06:18:34 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R301e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VkiFAAr_1686316709; Received: from localhost.localdomain(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VkiFAAr_1686316709) by smtp.aliyun-inc.com; Fri, 09 Jun 2023 21:18:29 +0800 From: Xianting Tian To: arei.gonglei@huawei.com, mst@redhat.com, jasowang@redhat.com, xuanzhuo@linux.alibaba.com, herbert@gondor.apana.org.au, davem@davemloft.net, amit@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com Cc: linux-bluetooth@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Xianting Tian , Xianting Tian Subject: [PATCH 1/3] virtio-crypto: fixup potential cpu stall when free unused bufs Date: Fri, 9 Jun 2023 21:18:15 +0800 Message-Id: <20230609131817.712867-2-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230609131817.712867-1-xianting.tian@linux.alibaba.com> References: <20230609131817.712867-1-xianting.tian@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Xianting Tian Cpu stall issue may happen if device is configured with multi queues and large queue depth, so fix it. Signed-off-by: Xianting Tian --- drivers/crypto/virtio/virtio_crypto_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypto/virtio/virtio_crypto_core.c index 1198bd306365..94849fa3bd74 100644 --- a/drivers/crypto/virtio/virtio_crypto_core.c +++ b/drivers/crypto/virtio/virtio_crypto_core.c @@ -480,6 +480,7 @@ static void virtcrypto_free_unused_reqs(struct virtio_crypto *vcrypto) kfree(vc_req->req_data); kfree(vc_req->sgs); } + cond_resched(); } }