public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: oe-kbuild@lists.linux.dev, Brijesh Singh <brijesh.singh@amd.com>,
	lkp@intel.com,  oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	 Paolo Bonzini <pbonzini@redhat.com>,
	Alexey Kardashevskiy <aik@amd.com>,
	Ashish Kalra <ashish.kalra@amd.com>,
	 Tom Lendacky <thomas.lendacky@amd.com>,
	Liam Merwick <liam.merwick@oracle.com>,
	 Michael Roth <michael.roth@amd.com>
Subject: Re: arch/x86/kvm/svm/sev.c:454 __sev_guest_init() warn: missing error code 'ret'
Date: Tue, 22 Oct 2024 10:28:57 -0700	[thread overview]
Message-ID: <Zxfg2bTkTgObpexL@google.com> (raw)
In-Reply-To: <148feb5b-cdd8-4065-8570-d0304383cc62@stanley.mountain>

On Mon, Oct 21, 2024, Dan Carpenter wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   3d5ad2d4eca337e80f38df77de89614aa5aaceb9
> commit: 88caf544c9305313e1c48ac1a437faa5df8fff06 KVM: SEV: Provide support for SNP_GUEST_REQUEST NAE event
> config: x86_64-randconfig-161-20241016 (https://download.01.org/0day-ci/archive/20241019/202410192220.MeTyHPxI-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202410192220.MeTyHPxI-lkp@intel.com/
> 
> New smatch warnings:
> arch/x86/kvm/svm/sev.c:454 __sev_guest_init() warn: missing error code 'ret'
> 
> 88caf544c93053 Brijesh Singh         2024-07-01  452  	/* This needs to happen after SEV/SNP firmware initialization. */
> 88caf544c93053 Brijesh Singh         2024-07-01  453  	if (vm_type == KVM_X86_SNP_VM && snp_guest_req_init(kvm))
> 88caf544c93053 Brijesh Singh         2024-07-01 @454  		goto e_free;
> 
> Hard to tell if this is an error path or not.

It's an error path.  Luckily, the fallout is only that userspace will be confused,
e.g. KVM doesn't continue configuring state thinking that pervious steps succeeded.

I'll send a patch.

Thanks!

      reply	other threads:[~2024-10-22 17:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21  7:28 arch/x86/kvm/svm/sev.c:454 __sev_guest_init() warn: missing error code 'ret' Dan Carpenter
2024-10-22 17:28 ` Sean Christopherson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zxfg2bTkTgObpexL@google.com \
    --to=seanjc@google.com \
    --cc=aik@amd.com \
    --cc=ashish.kalra@amd.com \
    --cc=brijesh.singh@amd.com \
    --cc=dan.carpenter@linaro.org \
    --cc=liam.merwick@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=michael.roth@amd.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=thomas.lendacky@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox