qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Shivang Upadhyay <shivangu@linux.ibm.com>, peter.maydell@linaro.org
Cc: adityag@linux.ibm.com, harshpb@linux.ibm.com,
	qemu-devel@nongnu.org, sourabhjain@linux.ibm.com
Subject: Re: [PATCH v2 1/2] hw/ppc: Fix missing return on allocation failure
Date: Tue, 28 Oct 2025 09:35:40 +0100	[thread overview]
Message-ID: <8d5a8cce-d769-4cd8-9753-7e9ad37d8a47@linaro.org> (raw)
In-Reply-To: <20251028080551.92722-2-shivangu@linux.ibm.com>

On 28/10/25 09:05, Shivang Upadhyay wrote:
> Fixes coverity (CID 1642026)
> 
> Cc: Aditya Gupta <adityag@linux.ibm.com>
> Cc: Harsh Prateek Bora <harshpb@linux.ibm.com>
> Link: https://lore.kernel.org/qemu-devel/CAFEAcA-SPmsnU1wzsWxBcFC=ZM_DDhPEg1N4iX9Q4bL1xOnwBg@mail.gmail.com/
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Shivang Upadhyay <shivangu@linux.ibm.com>
> ---
>   hw/ppc/spapr_fadump.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/ppc/spapr_fadump.c b/hw/ppc/spapr_fadump.c
> index fa3aeac94c..883a60cdcf 100644
> --- a/hw/ppc/spapr_fadump.c
> +++ b/hw/ppc/spapr_fadump.c
> @@ -234,6 +234,7 @@ static bool do_preserve_region(FadumpSection *region)
>           qemu_log_mask(LOG_GUEST_ERROR,

FWIW host heap exhaustion is not really a *guest* error, because the
guest can not control it.

>               "FADump: Failed allocating memory (size: %zu) for copying"
>               " reserved memory regions\n", FADUMP_CHUNK_SIZE);
> +        return false;
>       }
>   
>       num_chunks = ceil((src_len * 1.0f) / FADUMP_CHUNK_SIZE);



  reply	other threads:[~2025-10-28  8:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28  8:05 [PATCH v2 0/2] ppc: Fixes for fadump feature Shivang Upadhyay
2025-10-28  8:05 ` [PATCH v2 1/2] hw/ppc: Fix missing return on allocation failure Shivang Upadhyay
2025-10-28  8:35   ` Philippe Mathieu-Daudé [this message]
2025-10-28 10:24     ` Shivang Upadhyay
2025-10-30  8:05       ` Harsh Prateek Bora
2025-10-30  8:39         ` Shivang Upadhyay
2025-10-30 11:09         ` BALATON Zoltan
2025-10-30 14:22           ` Shivang Upadhyay
2025-10-30 14:45             ` Peter Maydell
2025-10-30 15:00               ` Shivang Upadhyay
2025-10-28  8:05 ` [PATCH v2 2/2] hw/ppc: Fix memory leak in get_cpu_state_data() Shivang Upadhyay
2025-10-28  8:33   ` Philippe Mathieu-Daudé
2025-10-28 10:26     ` Shivang Upadhyay

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=8d5a8cce-d769-4cd8-9753-7e9ad37d8a47@linaro.org \
    --to=philmd@linaro.org \
    --cc=adityag@linux.ibm.com \
    --cc=harshpb@linux.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shivangu@linux.ibm.com \
    --cc=sourabhjain@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).