[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGn2d8P-uYEULKs+90cr1AZcJW+mtaaZv8oixpePD6ttYR-0dQ@mail.gmail.com>
Date: Sun, 29 Jun 2025 12:51:36 +0300
From: Abdelrahman Fekry <abdelrahmanfekry375@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: andy@...nel.org, hdegoede@...hat.com, mchehab@...nel.org,
sakari.ailus@...ux.intel.com, gregkh@...uxfoundation.org,
linux-kernel-mentees@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org, linux-staging@...ts.linux.dev,
skhan@...uxfoundation.com, dan.carpenter@...aro.org
Subject: Re: [PATCH] staging: media: atomisp: Fix premature setting of
HMM_BO_DEVICE_INITED flag
On Sat, Jun 28, 2025 at 10:52 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> On Sat, Jun 28, 2025 at 8:26 AM Abdelrahman Fekry
> <abdelrahmanfekry375@...il.com> wrote:
> >
> > The HMM_BO_DEVICE_INITED flag was being set in hmm_bo_device_init()
> > before key initialization steps like kmem_cache_create(),
> > kmem_cache_alloc(), and __bo_init().
> >
> > This means that if any of these steps fail, the flag remains set,
> > misleading other parts of the driver (e.g. hmm_bo_alloc())
> > into thinking the device is initialized. This could lead
> > to undefined behavior or invalid memory use.
>
> Nice. Can you make some fault injection (temporary by modifying the
> code to always fail, for example) and actually prove this in practice?
> If so, the few (important) lines from the given Oops would be nice to
> have here.
I will look out how this can be done. Thanks for the feedback
> --
> With Best Regards,
> Andy Shevchenko
Powered by blists - more mailing lists