Eugeniu Rosca
eca5084aab
media: vsp1: dl: Fix NULL pointer dereference on unbind
...
commit c92d30e4b78dc331909f8c6056c2792aa14e2166 upstream.
In commit f3b98e3c4d ("media: vsp1: Provide support for extended
command pools"), the vsp pointer used for referencing the VSP1 device
structure from a command pool during vsp1_dl_ext_cmd_pool_destroy() was
not populated.
Correctly assign the pointer to prevent the following
null-pointer-dereference when removing the device:
[*] h3ulcb-kf #>
echo fea28000.vsp > /sys/bus/platform/devices/fea28000.vsp/driver/unbind
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000028
Mem abort info:
ESR = 0x96000006
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
Data abort info:
ISV = 0, ISS = 0x00000006
CM = 0, WnR = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=00000007318be000
[0000000000000028] pgd=00000007333a1003, pud=00000007333a6003, pmd=0000000000000000
Internal error: Oops: 96000006 [#1 ] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 486 Comm: sh Not tainted 5.7.0-rc6-arm64-renesas-00118-ge644645abf47 #185
Hardware name: Renesas H3ULCB Kingfisher board based on r8a77951 (DT)
pstate: 40000005 (nZcv daif -PAN -UAO)
pc : vsp1_dlm_destroy+0xe4/0x11c
lr : vsp1_dlm_destroy+0xc8/0x11c
sp : ffff800012963b60
x29: ffff800012963b60 x28: ffff0006f83fc440
x27: 0000000000000000 x26: ffff0006f5e13e80
x25: ffff0006f5e13ed0 x24: ffff0006f5e13ed0
x23: ffff0006f5e13ed0 x22: dead000000000122
x21: ffff0006f5e3a080 x20: ffff0006f5df2938
x19: ffff0006f5df2980 x18: 0000000000000003
x17: 0000000000000000 x16: 0000000000000016
x15: 0000000000000003 x14: 00000000000393c0
x13: ffff800011a5ec18 x12: ffff800011d8d000
x11: ffff0006f83fcc68 x10: ffff800011a53d70
x9 : ffff8000111f3000 x8 : 0000000000000000
x7 : 0000000000210d00 x6 : 0000000000000000
x5 : ffff800010872e60 x4 : 0000000000000004
x3 : 0000000078068000 x2 : ffff800012781000
x1 : 0000000000002c00 x0 : 0000000000000000
Call trace:
vsp1_dlm_destroy+0xe4/0x11c
vsp1_wpf_destroy+0x10/0x20
vsp1_entity_destroy+0x24/0x4c
vsp1_destroy_entities+0x54/0x130
vsp1_remove+0x1c/0x40
platform_drv_remove+0x28/0x50
__device_release_driver+0x178/0x220
device_driver_detach+0x44/0xc0
unbind_store+0xe0/0x104
drv_attr_store+0x20/0x30
sysfs_kf_write+0x48/0x70
kernfs_fop_write+0x148/0x230
__vfs_write+0x18/0x40
vfs_write+0xdc/0x1c4
ksys_write+0x68/0xf0
__arm64_sys_write+0x18/0x20
el0_svc_common.constprop.0+0x70/0x170
do_el0_svc+0x20/0x80
el0_sync_handler+0x134/0x1b0
el0_sync+0x140/0x180
Code: b40000c2 f9403a60 d2800084 a9400663 (f9401400)
---[ end trace 3875369841fb288a ]---
Fixes: f3b98e3c4d ("media: vsp1: Provide support for extended command pools")
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-21 13:05:25 +02:00
arch
powerpc: Fix circular dependency between percpu.h and mmu.h
2020-08-21 13:05:24 +02:00
block
iocost: Fix check condition of iocg abs_vdebt
2020-08-19 08:15:58 +02:00
certs
crypto
keys: asymmetric: fix error return code in software_key_query()
2020-07-22 09:33:04 +02:00
Documentation
dt-bindings: iio: io-channel-mux: Fix compatible string in example code
2020-08-21 13:05:23 +02:00
drivers
media: vsp1: dl: Fix NULL pointer dereference on unbind
2020-08-21 13:05:25 +02:00
fs
cifs: Fix leak when handling lease break for cached root fid
2020-08-21 13:05:24 +02:00
include
genirq/affinity: Make affinity setting if activated opt-in
2020-08-21 13:05:20 +02:00
init
x86: Fix early boot crash on gcc-10, third try
2020-05-20 08:20:34 +02:00
ipc
ipc/util.c: sysvipc_find_ipc() incorrectly updates position index
2020-05-20 08:20:16 +02:00
kernel
genirq/PM: Always unlock IRQ descriptor in rearm_wake_irq()
2020-08-21 13:05:20 +02:00
lib
kobject: Avoid premature parent object freeing in kobject_cleanup()
2020-08-19 08:16:11 +02:00
LICENSES
mm
mm/mmap.c: Add cond_resched() for exit_mmap() CPU stalls
2020-08-19 08:16:02 +02:00
net
net: initialize fastreuse on inet_inherit_port
2020-08-19 08:16:23 +02:00
samples
bpf: Fix fds_example SIGSEGV error
2020-08-19 08:16:03 +02:00
scripts
recordmcount: only record relocation of type R_AARCH64_CALL26 on arm64.
2020-08-19 08:15:57 +02:00
security
Smack: prevent underflow in smk_set_cipso()
2020-08-19 08:16:16 +02:00
sound
ALSA: usb-audio: add quirk for Pioneer DDJ-RB
2020-08-19 08:16:27 +02:00
tools
tools, bpftool: Fix wrong return value in do_dump()
2020-08-19 08:16:19 +02:00
usr
initramfs: restore default compression behavior
2020-04-08 09:08:38 +02:00
virt
KVM: arm64: Don't inherit exec permission across page-table levels
2020-08-05 09:59:51 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
MAINTAINERS: Update drm/i915 bug filing URL
2020-02-28 17:22:19 +01:00
Makefile
Linux 5.4.59
2020-08-19 08:16:29 +02:00
README