Revision 1a07a94b47b1f528f39c3e6187b5eaf02efe44ea authored by Ondrej Jirman on 05 April 2019, 23:30:48 UTC, committed by Maxime Ripard on 08 April 2019, 08:30:23 UTC
There are two problems here: 1. Not all clk_data->hws[] need to be initialized, depending on various configured quirks. This leads to NULL ptr deref in clk_hw_unregister_gate() in sun8i_tcon_top_unbind() 2. If there is error when registering the clk_data->hws[], err_unregister_gates error path will try to unregister IS_ERR()=true (invalid) pointer. For problem (1) I have this stack trace: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 Call trace: clk_hw_unregister+0x8/0x18 clk_hw_unregister_gate+0x14/0x28 sun8i_tcon_top_unbind+0x2c/0x60 component_unbind.isra.4+0x2c/0x50 component_bind_all+0x1d4/0x230 sun4i_drv_bind+0xc4/0x1a0 try_to_bring_up_master+0x164/0x1c0 __component_add+0xa0/0x168 component_add+0x10/0x18 sun8i_dw_hdmi_probe+0x18/0x20 platform_drv_probe+0x3c/0x70 really_probe+0xcc/0x278 driver_probe_device+0x34/0xa8 Problem (2) was identified by head scratching. Signed-off-by: Ondrej Jirman <megous@megous.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190405233048.3823-1-megous@megous.com
1 parent b85d00b
File | Mode | Size |
---|---|---|
kasan | ||
Kconfig | -rw-r--r-- | 24.6 KB |
Kconfig.debug | -rw-r--r-- | 4.3 KB |
Makefile | -rw-r--r-- | 3.5 KB |
backing-dev.c | -rw-r--r-- | 27.0 KB |
balloon_compaction.c | -rw-r--r-- | 5.5 KB |
cleancache.c | -rw-r--r-- | 9.9 KB |
cma.c | -rw-r--r-- | 14.1 KB |
cma.h | -rw-r--r-- | 573 bytes |
cma_debug.c | -rw-r--r-- | 4.5 KB |
compaction.c | -rw-r--r-- | 75.0 KB |
debug.c | -rw-r--r-- | 5.9 KB |
debug_page_ref.c | -rw-r--r-- | 1.4 KB |
dmapool.c | -rw-r--r-- | 13.9 KB |
early_ioremap.c | -rw-r--r-- | 6.8 KB |
fadvise.c | -rw-r--r-- | 5.3 KB |
failslab.c | -rw-r--r-- | 1.4 KB |
filemap.c | -rw-r--r-- | 95.4 KB |
frame_vector.c | -rw-r--r-- | 6.4 KB |
frontswap.c | -rw-r--r-- | 14.2 KB |
gup.c | -rw-r--r-- | 54.9 KB |
gup_benchmark.c | -rw-r--r-- | 2.7 KB |
highmem.c | -rw-r--r-- | 11.7 KB |
hmm.c | -rw-r--r-- | 33.2 KB |
huge_memory.c | -rw-r--r-- | 82.5 KB |
hugetlb.c | -rw-r--r-- | 133.0 KB |
hugetlb_cgroup.c | -rw-r--r-- | 10.9 KB |
hwpoison-inject.c | -rw-r--r-- | 3.2 KB |
init-mm.c | -rw-r--r-- | 1.2 KB |
internal.h | -rw-r--r-- | 17.3 KB |
interval_tree.c | -rw-r--r-- | 3.1 KB |
khugepaged.c | -rw-r--r-- | 48.1 KB |
kmemleak-test.c | -rw-r--r-- | 3.2 KB |
kmemleak.c | -rw-r--r-- | 60.5 KB |
ksm.c | -rw-r--r-- | 89.4 KB |
list_lru.c | -rw-r--r-- | 14.6 KB |
maccess.c | -rw-r--r-- | 3.1 KB |
madvise.c | -rw-r--r-- | 22.9 KB |
memblock.c | -rw-r--r-- | 54.9 KB |
memcontrol.c | -rw-r--r-- | 170.3 KB |
memfd.c | -rw-r--r-- | 7.8 KB |
memory-failure.c | -rw-r--r-- | 52.1 KB |
memory.c | -rw-r--r-- | 124.5 KB |
memory_hotplug.c | -rw-r--r-- | 48.7 KB |
mempolicy.c | -rw-r--r-- | 72.4 KB |
mempool.c | -rw-r--r-- | 15.8 KB |
memtest.c | -rw-r--r-- | 2.8 KB |
migrate.c | -rw-r--r-- | 76.8 KB |
mincore.c | -rw-r--r-- | 6.7 KB |
mlock.c | -rw-r--r-- | 22.6 KB |
mm_init.c | -rw-r--r-- | 4.8 KB |
mmap.c | -rw-r--r-- | 99.9 KB |
mmu_context.c | -rw-r--r-- | 1.3 KB |
mmu_gather.c | -rw-r--r-- | 6.3 KB |
mmu_notifier.c | -rw-r--r-- | 11.5 KB |
mmzone.c | -rw-r--r-- | 2.4 KB |
mprotect.c | -rw-r--r-- | 15.6 KB |
mremap.c | -rw-r--r-- | 19.3 KB |
msync.c | -rw-r--r-- | 2.6 KB |
nommu.c | -rw-r--r-- | 47.6 KB |
oom_kill.c | -rw-r--r-- | 30.3 KB |
page-writeback.c | -rw-r--r-- | 84.4 KB |
page_alloc.c | -rw-r--r-- | 232.7 KB |
page_counter.c | -rw-r--r-- | 6.6 KB |
page_ext.c | -rw-r--r-- | 11.0 KB |
page_idle.c | -rw-r--r-- | 5.5 KB |
page_io.c | -rw-r--r-- | 10.5 KB |
page_isolation.c | -rw-r--r-- | 9.3 KB |
page_owner.c | -rw-r--r-- | 15.1 KB |
page_poison.c | -rw-r--r-- | 3.0 KB |
page_vma_mapped.c | -rw-r--r-- | 7.6 KB |
pagewalk.c | -rw-r--r-- | 8.7 KB |
percpu-internal.h | -rw-r--r-- | 5.9 KB |
percpu-km.c | -rw-r--r-- | 3.0 KB |
percpu-stats.c | -rw-r--r-- | 5.7 KB |
percpu-vm.c | -rw-r--r-- | 10.3 KB |
percpu.c | -rw-r--r-- | 85.7 KB |
pgtable-generic.c | -rw-r--r-- | 5.3 KB |
process_vm_access.c | -rw-r--r-- | 10.0 KB |
quicklist.c | -rw-r--r-- | 2.4 KB |
readahead.c | -rw-r--r-- | 16.5 KB |
rmap.c | -rw-r--r-- | 53.7 KB |
rodata_test.c | -rw-r--r-- | 1.4 KB |
shmem.c | -rw-r--r-- | 104.8 KB |
slab.c | -rw-r--r-- | 111.2 KB |
slab.h | -rw-r--r-- | 14.6 KB |
slab_common.c | -rw-r--r-- | 39.1 KB |
slob.c | -rw-r--r-- | 16.2 KB |
slub.c | -rw-r--r-- | 143.1 KB |
sparse-vmemmap.c | -rw-r--r-- | 6.6 KB |
sparse.c | -rw-r--r-- | 21.4 KB |
swap.c | -rw-r--r-- | 28.6 KB |
swap_cgroup.c | -rw-r--r-- | 5.2 KB |
swap_slots.c | -rw-r--r-- | 9.4 KB |
swap_state.c | -rw-r--r-- | 22.4 KB |
swapfile.c | -rw-r--r-- | 91.6 KB |
truncate.c | -rw-r--r-- | 26.4 KB |
usercopy.c | -rw-r--r-- | 9.5 KB |
userfaultfd.c | -rw-r--r-- | 16.0 KB |
util.c | -rw-r--r-- | 20.0 KB |
vmacache.c | -rw-r--r-- | 2.7 KB |
vmalloc.c | -rw-r--r-- | 70.9 KB |
vmpressure.c | -rw-r--r-- | 13.9 KB |
vmscan.c | -rw-r--r-- | 122.8 KB |
vmstat.c | -rw-r--r-- | 51.6 KB |
workingset.c | -rw-r--r-- | 19.1 KB |
z3fold.c | -rw-r--r-- | 30.6 KB |
zbud.c | -rw-r--r-- | 18.2 KB |
zpool.c | -rw-r--r-- | 10.7 KB |
zsmalloc.c | -rw-r--r-- | 60.4 KB |
zswap.c | -rw-r--r-- | 34.7 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...