Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp897931ybx; Thu, 31 Oct 2019 02:38:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4hSXZ3TIwimgU4+2XHzc4h5i3pW5G4ODfUXnUQjDxI5vFOnO5U5ziUDaKrT1ozrAsU8kz X-Received: by 2002:a17:906:d9d0:: with SMTP id qk16mr2843503ejb.70.1572514692619; Thu, 31 Oct 2019 02:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572514692; cv=none; d=google.com; s=arc-20160816; b=se1foLWtyZwicSH7bGdI5AESSE2ueXBXO5pJG8uC2NFzpScWyahh7kfwPC7EG6pGt7 PMan4NwHRfFveFHICFqFgR5LKw0C1unLP3FmGVtaCdoTBOO7fIghs439b8XPsCNrEKIM FpKN1ekF9cE+rIAsKRwEV+tbcTWmCwISZ6yphfjNfYDl7zTNIQHbDQ/kFXI41JXaJH0Z h1TtYlDJDrPJjP1ApY+galvABg4ZpyKb3wX0j4912+1FCeLCHXHZdr98YW4ILL3Ec4D2 GWKe2rVYEQ5BMNBO0r7u1c4telTj/ERCHghsmjIwChG3HK7Z1jNgAPXezb2ybvXW895j fL1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=wgyP5K8XSgBVkPXgCWfubE2yzRzdB25VvAHZgFQv1M4=; b=pYGC8RGSF6NZONM0r+r5QYxr8GU1UthwlK6mGNsGCk8g1ATtAPNeKdIcbuC8D2aL4V xpEqfVVGgIJ+wWCllRub3KkfRs+7HdUygkmymx1swWIRV4BTcTayYwvkfZDGQ6f+SuFL F6p6FV5XBoyRvtzoHGSQg0v5K+12aZ+dLUw6BB44LNLrXILVH3wVkX9vpuYzcpZ9pTjR oREIvGBPz0Z6ZEFOd8d4cCEixRWqS2pYJrG144IhzJFrJeU+W1mLtldjy8yDucd0/hAw nzlT3C7svBvOvl2M8FgwpYqsNIObDx9nAAg/IqhbkQWewnx/gdyrVpSeYr4qhB1eLi/B omkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b="vK/5pEsU"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s39si3724122edm.338.2019.10.31.02.37.49; Thu, 31 Oct 2019 02:38:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b="vK/5pEsU"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727249AbfJaJgq (ORCPT + 99 others); Thu, 31 Oct 2019 05:36:46 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:39023 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726937AbfJaJgq (ORCPT ); Thu, 31 Oct 2019 05:36:46 -0400 Received: by mail-lf1-f67.google.com with SMTP id 195so4051329lfj.6 for ; Thu, 31 Oct 2019 02:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wgyP5K8XSgBVkPXgCWfubE2yzRzdB25VvAHZgFQv1M4=; b=vK/5pEsUfR4cEvCUmJggtsiAq2V4ibpuiYmmHPnDBXW2aM0dBLV8lL0AH1WuPcFVs6 EZ8NSJ6adonRQCHZHtK5+MKs2uqP2JOysiiTsQBhjii98UDGZXwHmfFYSIn1ZUSOmyq0 wYDL9yBUzAC4+bKha+F7+268MKD6Iq5FzRQt/kKeHiv1H/ecbjH/1+NcuIv5qResqFzv G4MywuzRi4k3HZuaa8c9pIay5kYng89o1hiOLtfNMDQPBZTXNpaOmgEGrcm0mjG7BleK oKlycpkggpcr7mwLFfpbYrr9/nzMlSboLvz2H+MT4HxSOJJRv7IWZb/FXtWd3680qC8n LsCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wgyP5K8XSgBVkPXgCWfubE2yzRzdB25VvAHZgFQv1M4=; b=l1M3r01QnvMlPVwA7UKD7Tlvkv0DWHb75De4GgkWryGRjhh7CMaUiI8C8H6w4+YfEB nVMH6GaqfIJXZqt+g9XDxQczQ/5SSBeon0OK1HQyHLWO0JlZ3gMe/Id1ifrrkUNA8zbY 0hlLTLLJQm1edVGD1kbJnnInpKWMfwzZJaeLfFkYWDXDXwu02RlWTeZxkmzimKaZY2oN BZ6RrdfapGcBklTOLCpsyzK9j2jf4GFC1COOHrYhSbCdlMOr2r6Qc1s+cEq7mc1zid0T QoDQRnUNryEKP0Tka+0QKy1Y+m9TZBe4D0tiW8FuKVVlJqAMTnz8uWthF31nqlFkzz+G lz+A== X-Gm-Message-State: APjAAAXVgHVmEsWxcNs2P6L7CSuhkDCed5RyzFuVnz8yIIAtPW+78hUN s/fldRlk7ZeEouFnlOiQtr5jQA== X-Received: by 2002:ac2:5f0a:: with SMTP id 10mr2699731lfq.57.1572514602594; Thu, 31 Oct 2019 02:36:42 -0700 (PDT) Received: from ?IPv6:2a00:1fa0:4225:b18c:bdc4:9185:f589:ee11? ([2a00:1fa0:4225:b18c:bdc4:9185:f589:ee11]) by smtp.gmail.com with ESMTPSA id p193sm2680682lfa.18.2019.10.31.02.36.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Oct 2019 02:36:41 -0700 (PDT) Subject: Re: [PATCH] vsock: Simplify '__vsock_release()' To: Christophe JAILLET , davem@davemloft.net, sunilmut@microsoft.com, willemb@google.com, sgarzare@redhat.com, stefanha@redhat.com, ytht.net@gmail.com, arnd@arndb.de, tglx@linutronix.de, decui@microsoft.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org References: <20191031064741.4567-1-christophe.jaillet@wanadoo.fr> From: Sergei Shtylyov Message-ID: Date: Thu, 31 Oct 2019 12:36:30 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191031064741.4567-1-christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 31.10.2019 9:47, Christophe JAILLET wrote: > Use '__skb_queue_purge()' instead of re-implementing it. In don't see that double underscore below... > Signed-off-by: Christophe JAILLET > --- > net/vmw_vsock/af_vsock.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c > index 2ab43b2bba31..2983dc92ca63 100644 > --- a/net/vmw_vsock/af_vsock.c > +++ b/net/vmw_vsock/af_vsock.c [...] > @@ -662,8 +661,7 @@ static void __vsock_release(struct sock *sk, int level) > sock_orphan(sk); > sk->sk_shutdown = SHUTDOWN_MASK; > > - while ((skb = skb_dequeue(&sk->sk_receive_queue))) > - kfree_skb(skb); > + skb_queue_purge(&sk->sk_receive_queue); > > /* Clean up any sockets that never were accepted. */ > while ((pending = vsock_dequeue_accept(sk)) != NULL) { MBR, Sergei