Skip to content

Commit 62cbabc

Browse files
lategoodbyegregkh
authored andcommitted
staging: vc04_services: vchiq_arm: Fix NULL ptr dereferences
The commit 8c9753f ("staging: vc04_services: vchiq_arm: Drop g_cache_line_size") introduced NULL pointer dereferences by using the wrong device. Fixes: 8c9753f ("staging: vc04_services: vchiq_arm: Drop g_cache_line_size") Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Link: https://lore.kernel.org/r/20240420091240.9552-1-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent bae5024 commit 62cbabc

File tree

1 file changed

+2
-2
lines changed
  • drivers/staging/vc04_services/interface/vchiq_arm

1 file changed

+2
-2
lines changed

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ create_pagelist(struct vchiq_instance *instance, char *buf, char __user *ubuf,
257257
if (count >= INT_MAX - PAGE_SIZE)
258258
return NULL;
259259

260-
drv_mgmt = dev_get_drvdata(instance->state->dev->parent);
260+
drv_mgmt = dev_get_drvdata(instance->state->dev);
261261

262262
if (buf)
263263
offset = (uintptr_t)buf & (PAGE_SIZE - 1);
@@ -436,7 +436,7 @@ free_pagelist(struct vchiq_instance *instance, struct vchiq_pagelist_info *pagel
436436

437437
dev_dbg(instance->state->dev, "arm: %pK, %d\n", pagelistinfo->pagelist, actual);
438438

439-
drv_mgmt = dev_get_drvdata(instance->state->dev->parent);
439+
drv_mgmt = dev_get_drvdata(instance->state->dev);
440440

441441
/*
442442
* NOTE: dma_unmap_sg must be called before the

0 commit comments

Comments
 (0)