mirror of https://github.com/torvalds/linux.git
devm_kcalloc() may fail. ndtest_probe() allocates three DMA address
arrays (dcr_dma, label_dma, dimm_dma) and later unconditionally uses
them in ndtest_nvdimm_init(), which can lead to a NULL pointer
dereference under low-memory conditions.
Check all three allocations and return -ENOMEM if any allocation fails,
jumping to the common error path. Do not emit an extra error message
since the allocator already warns on allocation failure.
Fixes:
|
||
|---|---|---|
| .. | ||
| test | ||
| Kbuild | ||
| Makefile | ||
| acpi_nfit_test.c | ||
| config_check.c | ||
| dax-dev.c | ||
| dax_pmem_test.c | ||
| device_dax_test.c | ||
| libnvdimm_test.c | ||
| pmem-dax.c | ||
| pmem_test.c | ||
| watermark.h | ||