From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Subject: Re: [PATCH] media: renesas: vsp1: Fix NULL pointer deref on module unload
Date: Wed, 11 Mar 2026 10:06:30 +0100 [thread overview]
Message-ID: <abEwF39-dSVPWVAb@zed> (raw)
In-Reply-To: <0a8c0467-04f7-4b8f-8988-cb5665ca1d68@ideasonboard.com>
Hi Tomi
I intend to send out soon a series for other Renesas components
which shouldn't be controversial. If I can get tags quickly I intend
to send a pull request for v7.0 next week.
I can include this patch and your other one which I don't see collected yet:
[PATCH] media: renesas: vin: Fix RAW8 (again)
unless someone else intends to handle it.
On Wed, Mar 11, 2026 at 08:15:43AM +0200, Tomi Valkeinen wrote:
> Hi,
>
> Ping. Would be good to have this fix merged.
>
> Tomi
>
> On 15/01/2026 11:22, Tomi Valkeinen wrote:
> > From: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
> >
> > When unloading the module on gen 4, we hit a NULL pointer dereference.
> > This is caused by the cleanup code calling vsp1_drm_cleanup() where it
> > should be calling vsp1_vspx_cleanup().
> >
> > Fix this by checking the IP version and calling the drm or vspx function
> > accordingly, the same way as the init code does.
> >
> > Fixes: d06c1a9f348d ("media: vsp1: Add VSPX support")
> > Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
> > ---
> > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> > ---
> > drivers/media/platform/renesas/vsp1/vsp1_drv.c | 8 ++++++--
> > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/platform/renesas/vsp1/vsp1_drv.c b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> > index 6c64657fc4f3..30df9b36642d 100644
> > --- a/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> > +++ b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> > @@ -240,8 +240,12 @@ static void vsp1_destroy_entities(struct vsp1_device *vsp1)
> > media_device_unregister(&vsp1->media_dev);
> > media_device_cleanup(&vsp1->media_dev);
> >
> > - if (!vsp1->info->uapi)
> > - vsp1_drm_cleanup(vsp1);
> > + if (!vsp1->info->uapi) {
> > + if (vsp1->info->version == VI6_IP_VERSION_MODEL_VSPX_GEN4)
> > + vsp1_vspx_cleanup(vsp1);
> > + else
> > + vsp1_drm_cleanup(vsp1);
> > + }
> > }
> >
> > static int vsp1_create_entities(struct vsp1_device *vsp1)
> >
> > ---
> > base-commit: 7d0a66e4bb9081d75c82ec4957c50034cb0ea449
> > change-id: 20260115-rcar-vsp-crash-fix-8d4871f0f39e
> >
> > Best regards,
>
next prev parent reply other threads:[~2026-03-11 9:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 9:22 [PATCH] media: renesas: vsp1: Fix NULL pointer deref on module unload Tomi Valkeinen
2026-01-15 14:20 ` Jacopo Mondi
2026-01-15 16:14 ` Kieran Bingham
2026-03-11 6:15 ` Tomi Valkeinen
2026-03-11 9:06 ` Jacopo Mondi [this message]
2026-03-11 9:07 ` Tomi Valkeinen
2026-03-11 9:17 ` Sakari Ailus
2026-03-18 19:46 ` Laurent Pinchart
2026-03-18 19:42 ` Laurent Pinchart
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=abEwF39-dSVPWVAb@zed \
--to=jacopo.mondi@ideasonboard.com \
--cc=hverkuil@kernel.org \
--cc=jacopo.mondi+renesas@ideasonboard.com \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tomi.valkeinen+renesas@ideasonboard.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.