Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2080323rwd; Fri, 9 Jun 2023 06:29:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ42HTKMd9C/ew0/O0sLBxLl0CfZQaoANDhtajj1vX4NuEuoxIJ7tptpBR5KNH1Dgd6+VG1P X-Received: by 2002:a05:6358:700d:b0:129:ce83:d541 with SMTP id 13-20020a056358700d00b00129ce83d541mr1255566rwo.21.1686317356764; Fri, 09 Jun 2023 06:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686317356; cv=none; d=google.com; s=arc-20160816; b=x+UaD7XVdSUBuHLoE4oEBwE9YShWsUvy68XmvHErCho4787m+Y/2NHW4dzA9YvjZhY fCcsTAejl2XmMb+5uWjXLzi1i+N+gLQ02MSwdd85fi0EqouDJ3o/rkZZkla0Y8wRlZM4 9KjoeQQbzoEjCkdkB53iCyVCMrwZ8s7rbjJ+FjP5UWw14CMpH1/AmuCCBBwJTFGLerxZ dX7ycBwn2Xz4TQgVhnUnc3sJPuHZkEO9sKcDB9uMgKwKAKyytABx2oql6qc3zzkNuFNW KBfvg+pBzkI5l22ys7EgpnMTvCqCfHcgDqH397UpioizLcFUBdiYFv7YAoNWWgJnBLHr roqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=GT1krBl2P5XPbHZIh+5CgTnDbHNXHQaSF92BESjBxgQ=; b=p7ROkv07/RMEKnT+uO8YzLqVqsLJIr+SqPG+6tDrm2KdEb49Fe0dJDrimN2ZjTLQQ9 3kiFDAYPvaYcHjGkF9R1KSkOX1DChpSXnoLYPsqvI+eNYj02RcHxgCyjiBbXzfrSQrq/ O1vflXMMOX8kkWn+34TjygczhoSyRjrt0pMJLykAwlN0aHiaSeQ93aqNPTHtguKqX5ax cZY0qqXPfHStsG5yY5mcRcwKyypgggjuRwB8va4JodpwU6/6OfwhBIZOyrPSPi7HLIL/ bAgraq5ncZpqOW6Z6+JUWu/pYUztPgJe/Ez33cOdYfpjDiG3QnJjOiCOVC8YS0U78bM1 cXLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r16-20020a638f50000000b0053481d76f48si2632856pgn.288.2023.06.09.06.28.58; Fri, 09 Jun 2023 06:29:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241269AbjFINSy (ORCPT + 99 others); Fri, 9 Jun 2023 09:18:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241157AbjFINSl (ORCPT ); Fri, 9 Jun 2023 09:18:41 -0400 Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29A3BE43; Fri, 9 Jun 2023 06:18:38 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R951e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0VkiFABr_1686316711; Received: from localhost.localdomain(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VkiFABr_1686316711) by smtp.aliyun-inc.com; Fri, 09 Jun 2023 21:18:31 +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 Subject: [PATCH 3/3] virtio_bt: fixup potential cpu stall when free unused bufs Date: Fri, 9 Jun 2023 21:18:17 +0800 Message-Id: <20230609131817.712867-4-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> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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/bluetooth/virtio_bt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c index c570c45d1480..2ac70b560c46 100644 --- a/drivers/bluetooth/virtio_bt.c +++ b/drivers/bluetooth/virtio_bt.c @@ -79,6 +79,7 @@ static int virtbt_close_vdev(struct virtio_bluetooth *vbt) while ((skb = virtqueue_detach_unused_buf(vq))) kfree_skb(skb); + cond_resched(); } return 0; -- 2.17.1