Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1614739lkv; Wed, 19 May 2021 14:06:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0WjHb+oGP1Yr9P4IbGWg8ly3YB86oRS5IKCCAwQWDWyEKA7ixFYOUoMK9cjSrCj2WAe7R X-Received: by 2002:a05:6602:1243:: with SMTP id o3mr1585664iou.93.1621458393784; Wed, 19 May 2021 14:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621458393; cv=none; d=google.com; s=arc-20160816; b=be59OB9eleoa3y/6lp8TrCToKDIZQZRmQJ5dsig36raSi5sKNVZh6D36CAlZ9wY5Su pBvLZldn1vc/R8HapzH5MuQhQh9rBlclvL5Ii6B0fGzUEiEq+GmKTI3+WGc/9bY5dLEB WPJAjPo/jrejZVUQV1MfGfmHddldcyGnC7JzgiUtmHNtN5ZIHc1HTwiEFkqx5OkG1cM9 WYpM9IsrWphTJ6e0kA6TivefahKHi1DvZuxK3vG0uRetrjfBpa2ogfztBSxgVCZcSaza Jypndv/h54OpxanLoLWiJaVbSBWoDd8p1gLS5av1RMwyxjUQzHsut70LXoyIqPCIFx5F bNyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=ohRHHZgmXArmJ98EBPU6NwbmhDjUgCzCw7MRbKUC3NU=; b=A+qJ046kr1YqdYnsoeqm+6PK4qABFlrUXYCYukfBFmeKzg2T4IGwZ2uZvPOUuhOakO rqUWHvJ8wZTEl5/+Iubz3IGTr1NMgAsghe7XNS7MG61eo40//Ri+lBy2WymqRHcsm4IJ qLB3JWak0Zk+JnPEujh7cso8Ee6b99npsv1AopSKzSrtAtmvXznVVQbhMROjwrqBz56G Qb45tDOkcppTG8yNEFZldwV5t9zLV5w+v1rcjLgpDiyVrjoPg1Uciu608cWCr/hNQNhh 7hp7L/rUTp41JMvSv7c8Rz5haMiLjLmQgKx0ql/yfgq76dbvgmGdRECQOEJFi5vUwzdX vyIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si463835jap.32.2021.05.19.14.06.21; Wed, 19 May 2021 14:06:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231360AbhERUrm (ORCPT + 99 others); Tue, 18 May 2021 16:47:42 -0400 Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:30306 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232261AbhERUrl (ORCPT ); Tue, 18 May 2021 16:47:41 -0400 Received: from [192.168.1.18] ([86.243.172.93]) by mwinf5d52 with ME id 6LmK2500421Fzsu03LmKQJ; Tue, 18 May 2021 22:46:20 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 18 May 2021 22:46:20 +0200 X-ME-IP: 86.243.172.93 Subject: Re: [PATCH 1/2] uio_hv_generic: Fix a memory leak in error handling paths To: Wei Liu Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, decui@microsoft.com, gregkh@linuxfoundation.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org References: <4fdaff557deef6f0475d02ba7922ddbaa1ab08a6.1620544055.git.christophe.jaillet@wanadoo.fr> <20210511095227.ggrl3z6otjanwffz@liuwe-devbox-debian-v2> <20210515160932.v4inlp5xlzokmmel@liuwe-devbox-debian-v2> From: Christophe JAILLET Message-ID: Date: Tue, 18 May 2021 22:46:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210515160932.v4inlp5xlzokmmel@liuwe-devbox-debian-v2> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 15/05/2021 à 18:09, Wei Liu a écrit : > On Tue, May 11, 2021 at 08:18:23PM +0200, Christophe JAILLET wrote: >> Le 11/05/2021 à 11:52, Wei Liu a écrit : >>>> Before commit cdfa835c6e5e, the 'vfree' were done unconditionally >>>> in 'hv_uio_cleanup()'. >>>> So, another way for fixing the potential leak is to modify >>>> 'hv_uio_cleanup()' and revert to the previous behavior. >>>> >>> >>> I think this is cleaner. >> >> Agreed > > Stephen, ping? > > If I don't hear back from you, I think Christophe should move ahead with > modifying hv_uio_cleanup. > > Wei. > Hi, just for your information, it has already been picked by Greg KH (see [1]). If the cleaner solution is preferred, it will be built on top of this patch. CJ [1]: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/uio/uio_hv_generic.c?id=3ee098f96b8b6c1a98f7f97915f8873164e6af9d