From patchwork Wed Nov 23 15:58:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiu Jianfeng X-Patchwork-Id: 2128 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2879585wrr; Wed, 23 Nov 2022 08:09:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf5azxLOS6GI0GCbXLMxr18stqZFGvW81c0ze33+Mk70w/mnajDsfyM80s91mIRNM9I8q/He X-Received: by 2002:a17:906:6892:b0:78d:ab48:bc84 with SMTP id n18-20020a170906689200b0078dab48bc84mr25562755ejr.22.1669219776014; Wed, 23 Nov 2022 08:09:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669219776; cv=none; d=google.com; s=arc-20160816; b=pu8tnKpYsePQcw0jcOZX/NjDokodLRwt7ndZLs8p/87uPcG9LUaFCNnakISeks0aY8 CImzmIaJwl+vpqzvqd8PcXXf+ly0nrjg+FnMJUeHvlGSEcBsruthNkcPX4h8W/xpNYTr bv1ndT0ze4GCdxamq/WOcPZoGLJlImOdVwCPabsxmV0dy8B8L7oTIzNCAEXFVhLn+ug9 4WtFbo3qElsd0TCgfy1rRNRooM2u9QGwlh4O79ah0akmPjt2UhgmZBTBdGoUqpjrVOsa N1c6fEgAKJapCZAgHZjFvl4eXTIClzET6g75PvNkT4UOqI47e78Q/jVc8e/QosDHiCmn uQqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=1QVn43eMWwCbTa89idfXKiNnqLbjvDzxBGdd4exGSbo=; b=ibn3um5TgZ4WFY6P7jMUcyPCvmIO852Hk7OcdNOeLOSBz1cQAtPO1Xs6JvodL8ff4D cVFZ0qwRS7sWFkvI4n6mWL+yw/IhTzIYXW89DjWLWoV04+ngjKsiGjegFBD26xVLgXLG Udnl2omn7ODgph98RuRkPwtmQNQZdMXmSJFKCXQ7Lcx98hYD9T7NkMcjE83QVCNQzahE tXdUBoPx6EkfWLiHWgCEJq5mLwMVU9roA2+5ajcMLuHPixnzaLOR0iBY8MjmKNnm27Qa +3hogT8Xz1Y5HBRxzNp4BAG41vlWOaYOnU3p/DHsL86eeHk6qejnCeknwM0KzoTEyGA5 7ulg== 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020a05640225c200b00469a09a7ccfsi6643979edb.11.2022.11.23.08.09.09; Wed, 23 Nov 2022 08:09:36 -0800 (PST) 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237787AbiKWQC0 (ORCPT + 99 others); Wed, 23 Nov 2022 11:02:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238742AbiKWQCH (ORCPT ); Wed, 23 Nov 2022 11:02:07 -0500 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DA8CC4C16 for ; Wed, 23 Nov 2022 08:02:04 -0800 (PST) Received: from dggpeml500023.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4NHQln6mVczJnhn; Wed, 23 Nov 2022 23:58:45 +0800 (CST) Received: from ubuntu1804.huawei.com (10.67.174.58) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 24 Nov 2022 00:02:02 +0800 From: Xiu Jianfeng To: , , , , , , , CC: , , Subject: [PATCH v2 0/2]x86/xen: Fix memory leak issue Date: Wed, 23 Nov 2022 23:58:56 +0800 Message-ID: <20221123155858.11382-1-xiujianfeng@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.67.174.58] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500023.china.huawei.com (7.185.36.114) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750303796366718227?= X-GMAIL-MSGID: =?utf-8?q?1750303796366718227?= The new string allocated by kasprintf() is leaked on error paths v2: follow Juergen's suggestion. Xiu Jianfeng (2): x86/xen: Fix memory leak in xen_smp_intr_init{_pv}() x86/xen: Fix memory leak in xen_init_lock_cpu() arch/x86/xen/smp.c | 24 ++++++++++++------------ arch/x86/xen/smp_pv.c | 12 ++++++------ arch/x86/xen/spinlock.c | 6 +++--- 3 files changed, 21 insertions(+), 21 deletions(-)