diff options
| author | Anders Roxell <[email protected]> | 2018-12-28 00:33:31 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2018-12-28 12:11:46 -0800 |
| commit | 368686a95e55fd66b88542b5b23d802a4886b1aa (patch) | |
| tree | ee75130c8e26ce68889b2df895a0f1330e51e626 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 6a90a83f1d1957647581ca48caa1f7cc4fa44f8d (diff) | |
writeback: don't decrement wb->refcnt if !wb->bdi
This happened while running in qemu-system-aarch64, the AMBA PL011 UART
driver when enabling CONFIG_DEBUG_TEST_DRIVER_REMOVE.
arch_initcall(pl011_init) came before subsys_initcall(default_bdi_init),
devtmpfs' handle_remove() crashes because the reference count is a NULL
pointer only because wb->bdi hasn't been initialized yet.
Rework so that wb_put have an extra check if wb->bdi before decrement
wb->refcnt and also add a WARN_ON_ONCE to get a warning if it happens
again in other drivers.
Link: http://lkml.kernel.org/r/[email protected]
Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Anders Roxell <[email protected]>
Co-developed-by: Arnd Bergmann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions