Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2104952ybv; Fri, 21 Feb 2020 08:59:40 -0800 (PST) X-Google-Smtp-Source: APXvYqxS42DYue2D6hqeigr/TmjramldxHSAwDsDbhMsfYMah9s4GBE04arCp9m5OS0EMlE4Fv9p X-Received: by 2002:aca:49ce:: with SMTP id w197mr2843543oia.16.1582304380558; Fri, 21 Feb 2020 08:59:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582304380; cv=none; d=google.com; s=arc-20160816; b=FJjsi7nstc+bVSbqnQidejNMXr6X1120E7RgZM/Ox5IHFwA7AA0WnfG4197T5onNW1 XcY3R37tw2V5luMyCeqi26CsQMtkN9E7YCm7qnl6ziYahrsOS04WJfXUKhPNBZH0hgSk LGTrv9/JUqLrYMhb/IyleLG/pgFfw4IDCbTRhh3YXESBE9+fc1g6/yhXN4by4Eqbz8pJ 84PQlVdRf34RcmQ7EyjF7EmDpKgMzkkwHtvSQu4CNXBKqcfIPIyywXXNGVZookasGgMY qjR68rN6FEc1Nv8EJVCdT9TFFKNu5kubXWBBy6h0NVQNFMLJ8+8ZsWHIH47/GuMPypH5 0eDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=p7XbHrCaOSwrBpqaeeYKNxlSBdnjl6OZnbi6u5hXQjU=; b=zyeu18QQWa6Qv7/v5OddCMNS8nAnaM0b0e3NWZu4OwmNn89vNrca/srf7zChdn/vta 4vc8I8cqTb6NqyHzUACOlAJeH8shtfdUwk/xfB+CuA0+UOT7H9XyKrOq50p6wuMD8NHj 2bLM1vRZygKIL8rFAWlYZ9uT9byMkkR5dO/EFLffkoLB7gSgdDetY5Kdjup4mCnFRVB+ w6zwvgblh+bCkiYzgLr8bPYrp14bz8GXieZEYsaennFGw2cx/9RVi5rDbcS8z8eednWA SmGeTegacDy5m10T9UhjPQ7HOkpXDmb9hl6IGjn/N7Ul8XsQGHoVe3DBgCdo6M5mIz0Y 6+KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EMEkTU0q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si1580594oto.194.2020.02.21.08.59.26; Fri, 21 Feb 2020 08:59:40 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EMEkTU0q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726927AbgBUQ6Q (ORCPT + 99 others); Fri, 21 Feb 2020 11:58:16 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:27830 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726150AbgBUQ6Q (ORCPT ); Fri, 21 Feb 2020 11:58:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582304294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p7XbHrCaOSwrBpqaeeYKNxlSBdnjl6OZnbi6u5hXQjU=; b=EMEkTU0qiWe9uQdLUD+MoUPIklGzc2E5g1LhnD33o0lljD1Ecq/nJIfS+iXkhOPGLdfCUx ATzbZqv9WdYYSo3BW+zp2kKdPtJ5SOLlQwk4nrWag8CDYeAz/yahqOS2DQORT/j3ZYcFFb l6vhQyu1YzML7926LYX7W8QM+r8E/bg= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-236-OjTbVB6iM-2wZJAt4nmYmA-1; Fri, 21 Feb 2020 11:58:08 -0500 X-MC-Unique: OjTbVB6iM-2wZJAt4nmYmA-1 Received: by mail-wm1-f69.google.com with SMTP id b8so2055116wmj.0 for ; Fri, 21 Feb 2020 08:58:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=p7XbHrCaOSwrBpqaeeYKNxlSBdnjl6OZnbi6u5hXQjU=; b=UcpE4fpEWe5f5mBSxGZBb/hoSl0JA/I4ihp1BnwZwKxBD83pMEt/jBrSsLfB5s4hP7 J0kpdKD+oXHEdwFZl6+yxB4Fb9Ojv4SGlaW03XrpSxR4GjfjmPUJXxVDaJoKUWOeaEoY c2qsiABRTKdWPbbRlju3PW+/XxZsNGsORmM00gig7/NqBCptidjnuPkgYo+BD69pifp9 L7WPaH+j2udfcDltSeaz1gJNkXFRirN6zfZteyXVMblM3AYaSx+U24XSV/0C9Yi96Gio EgOqSaovwW1FuQiGurFVcOexm9zjl6HCrwKYZ5b5ZeL3gACL3i4qpuJSVqdc59WdQSDd 90kg== X-Gm-Message-State: APjAAAVKvu8Mv1KKUoIDU6DDRGM24a8crX85o57P4ZsrfI6UuZWGqn5g ItX94tGcDH7FGeGbXPQ+cslx+lVb0Ezd9gpe89zp3JB70iZcV9LBMXdOAShLS1UI83wgCqx3G9Z clN5ICfvtk0E6XQ6pBDo7uuhi X-Received: by 2002:a1c:6a16:: with SMTP id f22mr4689108wmc.53.1582304286616; Fri, 21 Feb 2020 08:58:06 -0800 (PST) X-Received: by 2002:a1c:6a16:: with SMTP id f22mr4689097wmc.53.1582304286341; Fri, 21 Feb 2020 08:58:06 -0800 (PST) Received: from [192.168.178.40] ([151.20.135.128]) by smtp.gmail.com with ESMTPSA id h205sm4700577wmf.25.2020.02.21.08.58.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Feb 2020 08:58:05 -0800 (PST) Subject: Re: [PATCH][resend] KVM: fix error handling in svm_cpu_init To: linmiaohe , "Li,Rongqing" Cc: Liran Alon , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "vkuznets@redhat.com" References: From: Paolo Bonzini Message-ID: Date: Fri, 21 Feb 2020 17:58:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/02/20 09:40, linmiaohe wrote: > 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 I queued your patch again, sorry to both of you. Paolo