public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: Sergei Heifetz <heifetz@yandex-team.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] target/i386: fix NULL pointer dereference in legacy-cache=off handling
Date: Mon, 9 Mar 2026 22:19:38 +0800	[thread overview]
Message-ID: <aa7W+oqYHTfa8UH9@intel.com> (raw)
In-Reply-To: <20260305060431.30347-1-heifetz@yandex-team.com>

On Thu, Mar 05, 2026 at 11:04:31AM +0500, Sergei Heifetz wrote:
> Date: Thu,  5 Mar 2026 11:04:31 +0500
> From: Sergei Heifetz <heifetz@yandex-team.com>
> Subject: [PATCH] target/i386: fix NULL pointer dereference in
>  legacy-cache=off handling
> X-Mailer: git-send-email 2.34.1
> 
> The check that xcc->model is not NULL occurs after it is dereferenced
> inside x86_cpu_get_versioned_cache_info(), so something like
> `-cpu host,legacy-cache=off` leads to a segfault rather than an error.
> This patch fixes that.
> 
> Fixes: cca0a000d06f897411a8a ("target/i386: allow versioned CPUs to specify new cache_info")
> Signed-off-by: Sergei Heifetz <heifetz@yandex-team.com>
> ---
>  target/i386/cpu.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>



  parent reply	other threads:[~2026-03-09 13:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-05  6:04 [PATCH] target/i386: fix NULL pointer dereference in legacy-cache=off handling Sergei Heifetz
2026-03-05  7:11 ` Vladimir Sementsov-Ogievskiy
2026-03-09 14:19 ` Zhao Liu [this message]
2026-03-11 10:51 ` Michael Tokarev
2026-03-11 11:58   ` Sergei Heifetz

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=aa7W+oqYHTfa8UH9@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=heifetz@yandex-team.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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