Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3313316rwl; Sun, 9 Apr 2023 12:48:37 -0700 (PDT) X-Google-Smtp-Source: AKy350b5oMxjEQFBoruzk9ogOjFl8kLa787/MWIGBaxY52IN7q7hARPlrMbpNvj4onkZzg9jPg1Y X-Received: by 2002:a17:902:e843:b0:19f:87b5:1873 with SMTP id t3-20020a170902e84300b0019f87b51873mr11126371plg.62.1681069716774; Sun, 09 Apr 2023 12:48:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681069716; cv=none; d=google.com; s=arc-20160816; b=FQ38Zt3cUY/rLbIhQIsBRFDhdSbI46mp6jG0YKbwechxMyUrswQiIRdX1yLFcFPpvg jhX/eNrDNwHdlNHoM5q/txj2MJeayyFhu7GDN2wqYHSbplQOMMfZZ6e1F0Z/njru2++r p2l7Vj8xDdOcqLbURsf8DyUQ4IO0JdpmQNVq8OFWS0rTz5sTSjXKdDC4ByDRUSTtYRd2 TaQ7PhwudLLG+g205xswSzYA8WceP+d8V8lTfddjPe6qe/xuYqV/Drnd6SNGPEzkFLVd tHsoANaqtOOOpRVNogJ/fbPzwxRae4a/6MbhkDqmWXgUl2RHBQN8O0XYXvCCA1AGbmeW TFcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id :dkim-signature; bh=J7zpBAxQ22u0GAaVe4TBJJwPsTv+M41weOXMx2R7sTc=; b=mFR7e/9hb2RF+nxvxItWLs9Zpocla92+Oy3WaA2Qlp0WNg+gdGCvPzd18iT6cJteGO fhlBM2PfxXs2+1LcLq2UOJHF5gO9MmhDw5G8XPMvNLGtCeHX4YYZKiJNSNBrv0RSirDx JuwmpYe8PTEdb8FQTUZQL3HaOBDV3ypmYlGVqWbsf9n9EQCPR7LvcNu39yyKGq9nQAPu AzgHqLT5xF8r9zPQTz6YOteCNJVGHmLgQvolXgh35nlH+zyEPLBac1Ruvo8DYQWvyV2s f/+ZbT2UHWNFnuekwCnZ/Hv+DrHGOJ8q8kjpWS65L6ASp6Q/LZquLmkCmqHTiRgx2Zdu 7OPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=ReUNUxKM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x26-20020a63171a000000b0051357734521si4792551pgl.604.2023.04.09.12.48.15; Sun, 09 Apr 2023 12:48:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=ReUNUxKM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229558AbjDITVp (ORCPT + 99 others); Sun, 9 Apr 2023 15:21:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjDITVo (ORCPT ); Sun, 9 Apr 2023 15:21:44 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3056F2707; Sun, 9 Apr 2023 12:21:42 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 8FF055FD05; Sun, 9 Apr 2023 22:21:38 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1681068098; bh=J7zpBAxQ22u0GAaVe4TBJJwPsTv+M41weOXMx2R7sTc=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type; b=ReUNUxKM/65C8FFsbC56Soj6eNdv+I0SyraX4jvRoByWYLItao2s5LN/w7m8UOX2M UB7B6P/GtZsFFF+bZc73s9HutQc4/rdWuS7TfJhB8/+IgfIm4XiPZSq7GHffoyiTze 4c4fO8OmjilzuCYcfHs/3TPdGQDdeNS5umSLOHjlJhJVT5/cMh65xsLXMmy2B/6Kt/ Ekv4yv1Jq4M3YnU976UuqJFREgigI90OJVmlPWy5i0X2ccy2wl0uNnscEXomOzCbXE qk5i2Y+nMLM0Uf/+93sq7JjjQF4+2FppWUW76QlFjpeeA2146i10g9bFMh5jr/LX83 yrn9ZHYq0zgjw== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Sun, 9 Apr 2023 22:21:34 +0300 (MSK) Message-ID: Date: Sun, 9 Apr 2023 22:17:51 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US To: Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Bobby Eshleman CC: , , , , , From: Arseniy Krasnov Subject: [RFC PATCH v1] vsock/loopback: don't disable irqs for queue access Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/04/09 07:48:00 #21070576 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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-kernel@vger.kernel.org This replaces 'skb_queue_tail()' with 'virtio_vsock_skb_queue_tail()'. The first one uses 'spin_lock_irqsave()', second uses 'spin_lock_bh()'. There is no need to disable interrupts in the loopback transport as there is no access to the queue with skbs from interrupt context. Both virtio and vhost transports work in the same way. Signed-off-by: Arseniy Krasnov --- net/vmw_vsock/vsock_loopback.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c index e3afc0c866f5..5c6360df1f31 100644 --- a/net/vmw_vsock/vsock_loopback.c +++ b/net/vmw_vsock/vsock_loopback.c @@ -31,8 +31,7 @@ static int vsock_loopback_send_pkt(struct sk_buff *skb) struct vsock_loopback *vsock = &the_vsock_loopback; int len = skb->len; - skb_queue_tail(&vsock->pkt_queue, skb); - + virtio_vsock_skb_queue_tail(&vsock->pkt_queue, skb); queue_work(vsock->workqueue, &vsock->pkt_work); return len; -- 2.25.1