Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4666606rwr; Mon, 8 May 2023 10:48:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4yU4y5hnx0xGjTnclX9jOGVffxREUmLuZWD9ZEOLLE/WeknU3PzjhoBmWdAxfFtV81Wcx4 X-Received: by 2002:a17:903:2343:b0:1ac:85b0:1bdb with SMTP id c3-20020a170903234300b001ac85b01bdbmr2933747plh.55.1683568089366; Mon, 08 May 2023 10:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683568089; cv=none; d=google.com; s=arc-20160816; b=z5erxRvZcpbdEk8nXuGMr+ppQFFK2dNptn6MGPnzHPh/FajVRe6W9hBVfNX9g+MWu2 lliHkukshTdEB74A9TkSTOug/h4a1XHSAMd5iXh6q73nP+t1PqFZuMkscN9ZGUIVEgBo tkhSuDaae/m2c175NtG0xJPznGHdASFoS12WhJYzdJsPROT2L+phaqT820KN29xnjbwL oNiNJzbhL3wkUem0pSTP1KN2BjxYEQN+oEP/7Bf+w4qg41+Qtd3bIuk0GbH1cVS8tBd7 /GGvOS80cC20f3CIuSt9yvUGwD1aLdKwoNRERSIerZ1L+Xiv/PfI6RNsHYxDfX1tDQVF qAXg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=2QoFpsxFnIi43IA3WhIvzttrLZvU1US3Lj4LjDzMa2M=; b=y+s7FImE+IG3o8QioQSU4EI4YdGPW+yQikTJGrw6uaRK47ThXtuNN8Jc6psNb/ZvNy ADzbbbFSgts9mUgWveXi2x45eaXy2DZ14ipUKkBkp8xemqUooDBxt39cnwdKk+H1aL9F a7xtrkIg0j8VKkvJTzZEUVXCM7iMYrME8dHHfU7g1Nitx9KgnicTUJkCVWAG/zE3M2R8 dBDIclIBOo7ciSvDoL5n7LMWUTF8M21dLg1q/dvs2i9BmV1dBGpVDrmT52rVQIfKB/O1 +VbfNxkJH7zB21AAF9JYRHaJoeIgXlYns1HmEb7Sl3aSPIt233aXbPLCiImOPCT66axn dy+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x15-20020a170902820f00b001a922c7f51dsi2787959pln.172.2023.05.08.10.47.51; Mon, 08 May 2023 10:48:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234134AbjEHRiz (ORCPT + 99 others); Mon, 8 May 2023 13:38:55 -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-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: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.