[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZyiFFr1fbEn2JkWq@smile.fi.intel.com>
Date: Mon, 4 Nov 2024 10:25:58 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Li Huafei <lihuafei1@...wei.com>
Cc: mchehab@...nel.org, alan@...ux.intel.com, hdegoede@...hat.com,
sakari.ailus@...ux.intel.com, gregkh@...uxfoundation.org,
linux-media@...r.kernel.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] media: atomisp: Add check for rgby_data memory
allocation failure
On Mon, Nov 04, 2024 at 10:22:53AM +0200, Andy Shevchenko wrote:
> On Mon, Nov 04, 2024 at 10:50:51PM +0800, 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.
...
> > --- 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;
>
> Which kernel version are you patching?
>
> The problem, you have reported here was fixed ~4.5 years ago.
Ah, sorry, I misread the line. Indeed, this one is still present in the current
code base.
Reviewed-by: Andy Shevchenko <andy@...nel.org>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists