From: Hans de Goede <hdegoede@redhat.com>
To: Li Huafei <lihuafei1@huawei.com>,
mchehab@kernel.org, alan@linux.intel.com
Cc: andy@kernel.org, sakari.ailus@linux.intel.com,
gregkh@linuxfoundation.org, linux-media@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] media: atomisp: Add check for rgby_data memory allocation failure
Date: Mon, 4 Nov 2024 13:04:34 +0100 [thread overview]
Message-ID: <24dadaaf-54ec-4f3a-9c6a-9aea755d0150@redhat.com> (raw)
In-Reply-To: <20241104145051.3088231-1-lihuafei1@huawei.com>
Hi,
On 4-Nov-24 3:50 PM, Li Huafei wrote:
> In ia_css_3a_statistics_allocate(), there is no check on the allocation
> result of the rgby_data memory. If rgby_data is not successfully
> allocated, it may trigger the assert(host_stats->rgby_data) assertion in
> ia_css_s3a_hmem_decode(). Adding a check to fix this potential issue.
>
> Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
> Signed-off-by: Li Huafei <lihuafei1@huawei.com>
Thank you for your patch(es).
I have merged this/these in my media-atomisp branch:
https://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux.git/log/?h=media-atomisp
And this/these will be included in my next pull-request to
Mauro (to media subsystem maintainer)
Regards,
Hans
> ---
> Changes in v2:
> - Corrects the "Fixes" tag.
> ---
> drivers/staging/media/atomisp/pci/sh_css_params.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c
> index 232744973ab8..b1feb6f6ebe8 100644
> --- a/drivers/staging/media/atomisp/pci/sh_css_params.c
> +++ b/drivers/staging/media/atomisp/pci/sh_css_params.c
> @@ -4181,6 +4181,8 @@ ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
> goto err;
> /* No weighted histogram, no structure, treat the histogram data as a byte dump in a byte array */
> me->rgby_data = kvmalloc(sizeof_hmem(HMEM0_ID), GFP_KERNEL);
> + if (!me->rgby_data)
> + goto err;
>
> IA_CSS_LEAVE("return=%p", me);
> return me;
prev parent reply other threads:[~2024-11-04 12:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 14:50 Li Huafei
2024-11-04 8:22 ` Andy Shevchenko
2024-11-04 8:25 ` Andy Shevchenko
2024-11-04 10:15 ` Markus Elfring
2024-11-04 10:54 ` Greg Kroah-Hartman
2024-11-04 12:04 ` Hans de Goede [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=24dadaaf-54ec-4f3a-9c6a-9aea755d0150@redhat.com \
--to=hdegoede@redhat.com \
--cc=alan@linux.intel.com \
--cc=andy@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lihuafei1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.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
all inboxes | Powered by JetHome®