Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp420592ybv; Thu, 20 Feb 2020 00:41:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwXzQV9UHI0f8NHDCgCejfhjtGUaVTyaalakOYAZ8QGujnyxrv0rBoIJ9R6Nj8aylSISIgu X-Received: by 2002:a05:6830:2361:: with SMTP id r1mr21695339oth.88.1582188070711; Thu, 20 Feb 2020 00:41:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582188070; cv=none; d=google.com; s=arc-20160816; b=NOsLUrpz4CTgwpVfhgk1hvR24/9+xoGpSIB1I08nlFtKoJ0Qk4GmYWcubzA/664Udg FKsHPLWn4Q4n++CpVi7NAVSiiS73m3s8LJxRaIY1W4+lxJmFA+PxhYyLXYSm8kuZ9pfu 7rGYhUHwBfdc0e3OBHdODQPA1eF2rixw/6RdFTfWgngtQv3+owUNnMzWRhnr+qSJ0wQn pqt9FLje6frxZ4paZBofjyIEKafOd5rT7psekPavs6h45SgPTLYsX57nl1tVNYcUhgEn mqFHm3AxmQOLklFFamg4jsMEcROaJabWTnhzPDmwly2q4dCRUGTwVxb6UTibdkkcKtvw +d+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=B2nCa6AhdPcFDPCkzgJd+psUZ1DJAk42QaMFBpz2rtU=; b=0b7+aybOfqon/y3DUfd66MCT+1fTrZ3EKhJk+fqJoiFAKqzwLUFpa2I8GByvNcIyca 0HX3BM1XeWekUjyPRGPgkJm0Q9gpq+H1u66whzxzBUw/RyzgPVJodg3kABMoMnEs5t8R R5LvB2evsL7xUVHGW7vLDpwfq2F3FUXw4Hx4RsNcyxKvTRS/37VM2CXdFGTOn98pd5ac XKApm3MJ6aYNNSiCqppCdMIB8yWTloSntsrqrNS4qOnUof/Pyh2Mkk3K7lqL3m/3g9IR kDCnvx7exDiPkAljIceAlNvMnO3XARaBTQT/KM8ZAAFMXoUi5lU2ZxFDlPiSIXG9xFoq lpug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si1385131otk.29.2020.02.20.00.40.58; Thu, 20 Feb 2020 00:41:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726839AbgBTIku convert rfc822-to-8bit (ORCPT + 99 others); Thu, 20 Feb 2020 03:40:50 -0500 Received: from szxga03-in.huawei.com ([45.249.212.189]:2586 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726637AbgBTIkt (ORCPT ); Thu, 20 Feb 2020 03:40:49 -0500 Received: from DGGEMM401-HUB.china.huawei.com (unknown [172.30.72.57]) by Forcepoint Email with ESMTP id E18444B4BD356A59F3C6; Thu, 20 Feb 2020 16:40:37 +0800 (CST) Received: from dggeme751-chm.china.huawei.com (10.3.19.97) by DGGEMM401-HUB.china.huawei.com (10.3.20.209) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 20 Feb 2020 16:40:37 +0800 Received: from dggeme753-chm.china.huawei.com (10.3.19.99) by dggeme751-chm.china.huawei.com (10.3.19.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 20 Feb 2020 16:40:36 +0800 Received: from dggeme753-chm.china.huawei.com ([10.7.64.70]) by dggeme753-chm.china.huawei.com ([10.7.64.70]) with mapi id 15.01.1713.004; Thu, 20 Feb 2020 16:40:36 +0800 From: linmiaohe To: "Li,Rongqing" CC: Liran Alon , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "pbonzini@redhat.com" , "vkuznets@redhat.com" Subject: Re: [PATCH][resend] KVM: fix error handling in svm_cpu_init Thread-Topic: [PATCH][resend] KVM: fix error handling in svm_cpu_init Thread-Index: AdXnyIf8QCn2ngYdSyKWLfuyXd13zw== Date: Thu, 20 Feb 2020 08:40:36 +0000 Message-ID: Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.173.221.158] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Li,Rongqing writes: >> Hi, >> Li RongQing writes: >> > >> >sd->save_area should be freed in error path >> Oh, it's strange. This is already fixed in my previous patch : [PATCH v2] KVM: >> SVM: Fix potential memory leak in svm_cpu_init(). >> And Vitaly and Liran gave me Reviewed-by tags and Paolo queued it one >> month ago. But I can't found it in master or queue branch. There might >> be something wrong. :( > >In fact, I send this patch 2019/02/, and get Reviewed-by, but did not queue > >https://patchwork.kernel.org/patch/10853973/ > >and resend it 2019/07 > >https://patchwork.kernel.org/patch/11032081/ > Oh, it's really a pit. And in this case, we can get rid of the var r as '-ENOMEM' is actually the only possible outcome here, as suggested by Vitaly, which looks like this: https://lkml.org/lkml/2020/1/15/933 Thanks. :)