From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5EB1CA9EC3 for ; Thu, 31 Oct 2019 09:49:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8478A2086D for ; Thu, 31 Oct 2019 09:49:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727237AbfJaJtD (ORCPT ); Thu, 31 Oct 2019 05:49:03 -0400 Received: from smtp07.smtpout.orange.fr ([80.12.242.129]:26180 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726913AbfJaJtD (ORCPT ); Thu, 31 Oct 2019 05:49:03 -0400 Received: from [192.168.42.210] ([93.23.12.90]) by mwinf5d66 with ME id L9ox2100X1waAWt039oxcA; Thu, 31 Oct 2019 10:49:01 +0100 X-ME-Helo: [192.168.42.210] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 31 Oct 2019 10:49:01 +0100 X-ME-IP: 93.23.12.90 Subject: Re: [PATCH] vsock: Simplify '__vsock_release()' To: Sergei Shtylyov , 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: Christophe JAILLET Message-ID: <1b33ca33-a02b-1923-cbee-814e520b9700@wanadoo.fr> Date: Thu, 31 Oct 2019 10:48:53 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 31/10/2019 à 10:36, Sergei Shtylyov a écrit : > 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... This is a typo in the commit message. There is no need for __ because skb_dequeue was used. Could you fix it directly in the commit message (preferred solution for me) or should I send a V2? CJ >> 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 >