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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 256F5C77B7F for ; Mon, 8 May 2023 17:38:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234114AbjEHRiy (ORCPT ); Mon, 8 May 2023 13:38:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234062AbjEHRil (ORCPT ); Mon, 8 May 2023 13:38:41 -0400 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D0DA7AAA; Mon, 8 May 2023 10:38:32 -0700 (PDT) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1ab1b79d3a7so32658615ad.3; Mon, 08 May 2023 10:38:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683567511; x=1686159511; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2QoFpsxFnIi43IA3WhIvzttrLZvU1US3Lj4LjDzMa2M=; b=QcPdAXdccNqF0WKZ8HsZ9p/VACdx2Zy5WIU3kxitFe/TjxOmvnr8u5trJZBSlHz/Tw nz/bvEDfY56gGnb+wnv+fus7YVCaJSUDQO2mGIBmiLm0OyYBC7/Tckmk2fwFes7vLWEv /NsrflbUbvH1h3AI1aL9qVUGLbcRTqG7b5Skl1ccekzLu74WGNgeOMr7N3x/RMFUdt5v d73lJ3kw0FdOlZS1IC9z2Imhf0owRA+ItkK7/w1v1UGq7ZkCu8PKtWm0+FAjJ3XCUD4G w2lBnMi+WeexnGqrGPs1HhnOrSKMtlj4JczZ8ceKa/IanWkKlIuMtwIzJBc3MfPNvAjA Eg9g== X-Gm-Message-State: AC+VfDya/mIX/XWbRxbi+tk800taObznLeV0SHGdHJZH8KeY8zDM7ppV s7cPldSCaB0iln36aoEDqx5ER3tofyE= X-Google-Smtp-Source: ACHHUZ6DJUfR6S3+HMNfkw8Wb61YopxgIZbPDTFWp0W5kCXFBb/FfPA5QI1Ak/S4pKL0NMgC0tup3g== X-Received: by 2002:a17:903:191:b0:1ac:750e:33f4 with SMTP id z17-20020a170903019100b001ac750e33f4mr5844935plg.32.1683567511266; Mon, 08 May 2023 10:38:31 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([20.69.120.36]) by smtp.gmail.com with ESMTPSA id om8-20020a17090b3a8800b002471deb13fcsm10375690pjb.6.2023.05.08.10.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 10:38:30 -0700 (PDT) Date: Mon, 8 May 2023 17:38:29 +0000 From: Wei Liu To: Dexuan Cui Cc: "Michael Kelley (LINUX)" , KY Srinivasan , Haiyang Zhang , "wei.liu@kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@kernel.org" Subject: Re: [PATCH] Drivers: hv: vmbus: Call hv_synic_free() if hv_synic_alloc() fails Message-ID: References: <20230504224155.10484-1-decui@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org On Sat, May 06, 2023 at 02:38:04AM +0000, Dexuan Cui wrote: > > From: Michael Kelley (LINUX) > > Sent: Friday, May 5, 2023 5:30 PM > > ... > > From: Dexuan Cui Sent: Thursday, May 4, 2023 3:42 > > PM > > > > > > Commit 572086325ce9 ("Drivers: hv: vmbus: Cleanup synic memory free > > > path") > > > says "Any memory allocations that succeeded will be freed when the caller > > > cleans up by calling hv_synic_free()", but if the get_zeroed_page() in > > > hv_synic_alloc() fails, currently hv_synic_free() is not really called > > > in vmbus_bus_init(), consequently there will be a memory lead, e.g. > > > > s/lead/leak/ > > Sorry for the typo. Wei, can you please help fix this? > > > > hv_context.hv_numa_map is not freed in the error path. Fix this by > > > updating the goto lables. > > > > s/lables/labels/ > Ditto. > > > The statement in commit 572086325ce9 was true at the time of that > > commit. But I broke things in commit 4df4cb9e99f8. Should add a > > "Fixes:" tag for 4df4cb9e99f8. > > I suppose Wei can help add the line: > Fixes: 4df4cb9e99f8 ("x86/hyperv: Initialize clockevents earlier in CPU onlining") > > > Nits notwithstanding, > > > > Reviewed-by: Michael Kelley Applied to hyperv-fixes. Thanks.