diff options
author | Dan Williams <dan.j.williams@intel.com> | 2020-08-01 04:38:26 +0300 |
---|---|---|
committer | Vishal Verma <vishal.l.verma@intel.com> | 2020-08-03 21:36:34 +0300 |
commit | 9f1048d47e8ae4cc21e80facf2ba4b01a6623b67 (patch) | |
tree | 63ddcda40da7133d559b65d2c3b0615073453590 /fs/jbd2 | |
parent | 49688e654e48ae176b5bfda33d2416b68e607ce8 (diff) | |
download | linux-9f1048d47e8ae4cc21e80facf2ba4b01a6623b67.tar.xz |
ACPI: NFIT: Fix ARS zero-sized allocation
Pending commit in -next "devres: handle zero size in devm_kmalloc()"
triggers a boot regression due to the ARS implementation expecting NULL
from a zero-sized allocation. Avoid the zero-sized allocation by
skipping ARS, otherwise crashes with the following signature when
de-referencing ZERO_SIZE_PTR.
BUG: kernel NULL pointer dereference, address: 0000000000000018
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
RIP: 0010:__acpi_nfit_scrub+0x28a/0x350 [nfit]
[..]
Call Trace:
? acpi_nfit_query_poison+0x6a/0x180 [nfit]
acpi_nfit_scrub+0x36/0xb0 [nfit]
process_one_work+0x23c/0x580
worker_thread+0x50/0x3b0
Otherwise the implementation correctly aborts when NULL is returned from
devm_kzalloc() in ars_status_alloc().
Link: https://lore.kernel.org/r/159624590643.3037264.14157533719042907758.stgit@dwillia2-desk3.amr.corp.intel.com
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Diffstat (limited to 'fs/jbd2')
0 files changed, 0 insertions, 0 deletions