Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1447185pxj; Sat, 15 May 2021 15:26:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiFmIVu9SfmFnvszYO7KhT79mopRoLFdtfjfwQHOy22Sz2S/O0ITy5PdnPwJMco4hQD/2z X-Received: by 2002:a17:907:768c:: with SMTP id jv12mr17088230ejc.215.1621117563652; Sat, 15 May 2021 15:26:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621117563; cv=none; d=google.com; s=arc-20160816; b=QYl7WUfUmcMRY2/vJjeaCsDf//e5TlrXhhvf/Crv/6s/3VWiy77YzTvhIj6QJLR3MI VQYvOg0fml09gBEvLF56GIHc/nz3yhxo5TNtLH45jtBFce6ulSJLwqV8DgsoyGjodnRB vSp+z+BHaBUkdIIfGl+rusHJyh/9fk8zfcQiwvbiJ69DnZnQv/14HvmIS67OAIjRkA99 I3P9ktFq7aD0YhTQ78AwkFXp89maqGr3WIi7ze1HaG6p4+6PcTM0Nw1vDgsz2zQA9byb Pkm8FlT5SfQZsl7KNfTRMiBLSqUA09HwaCr5DPjxMpvF8wp7DnMUlv86OwSJxZmKiT0x yRWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=aSGQJagwvk6PPII7IdB5b+OW9KihpKvzZJPLLXU8/AA=; b=cnjtQ7lxtlM80NM0LR0DxUBJQiJc+RdXwll/IVcNjCiMXLi0hc81SllQkrECFV0kTI sOi2CIe3/B3ZxaPn3PK+gTQT1puaKjSpcJFQyjU7P485quB+cfmal/qQ8clu6fACy1dp SDirxIJwZAdN/2dJyHaUa+Z81+Tnn2AACjAAS/8NeK/rvCdLJS7qe5OV3aBGB9Es90rM knQSevIj9rcmjj9RaBd4yb3DUAG45184F0hy9nYLEkzluzO+A3bhNBN5azFGhIAbjHQI DWbUbA88orjMmSLsNsGDQ68cdyK1x7E30/fLSLQY0q2bMzIUF3+kWwy8qSWBWLtuOHAN AGvw== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn42si2058660ejc.93.2021.05.15.15.25.40; Sat, 15 May 2021 15:26:03 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233243AbhEOQKv (ORCPT + 99 others); Sat, 15 May 2021 12:10:51 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:40865 "EHLO mail-wm1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233130AbhEOQKs (ORCPT ); Sat, 15 May 2021 12:10:48 -0400 Received: by mail-wm1-f42.google.com with SMTP id f6-20020a1c1f060000b0290175ca89f698so395798wmf.5; Sat, 15 May 2021 09:09:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=aSGQJagwvk6PPII7IdB5b+OW9KihpKvzZJPLLXU8/AA=; b=RKxP7Vtmn5cP1LVtEG6rsY1e3iRtfu8muTUKW1IUr+ebE+S3w6gX6nhFZkukQ0/wjq VMRfXN0oiSrxD8L7653ghBkN8ZlF+TOdQX745k2nX7D7ZkzQYY12MiyJIrwQWx+LmP5Q 92GFbk2luNmN79jpq08W7SUNGQSR6+UL+MdpXtQWB1k5nSw9FeIBjwp3WkNmjNjQU8tJ anyF1rTzQuE30CPg27wp8B5AEJGhtmLURCC+9VJYNhS/nH9OEddB+CN0FjFd5sQxKiVP 7iayf/n40gHK1bcKrD06kNHbKX4AAEsYhUsHx2m4flZvynqrRbSMQtbA2cj3gR9lhx4K Jh6w== X-Gm-Message-State: AOAM532LlhfsYtxGaQv/SyhpkAFzwUdcRRWhngQ2ha3w5Ig3Ioh3wDd1 TyTJwBUIRsG/fKkqrJMUkr4= X-Received: by 2002:a1c:7205:: with SMTP id n5mr15138368wmc.131.1621094974315; Sat, 15 May 2021 09:09:34 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id n6sm736281wmq.34.2021.05.15.09.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 May 2021 09:09:33 -0700 (PDT) Date: Sat, 15 May 2021 16:09:32 +0000 From: Wei Liu To: Christophe JAILLET Cc: Wei Liu , 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 Subject: Re: [PATCH 1/2] uio_hv_generic: Fix a memory leak in error handling paths Message-ID: <20210515160932.v4inlp5xlzokmmel@liuwe-devbox-debian-v2> References: <4fdaff557deef6f0475d02ba7922ddbaa1ab08a6.1620544055.git.christophe.jaillet@wanadoo.fr> <20210511095227.ggrl3z6otjanwffz@liuwe-devbox-debian-v2> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.