Re: [PATCH] dax: Fix potential uaf in __dax_pmem_probe()

2022-06-29 Thread kernel test robot
Hi Jianglei, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.19-rc4 next-20220629] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented

[PATCH] dax: Fix potential uaf in __dax_pmem_probe()

2022-06-29 Thread Jianglei Nie
__dax_pmem_probe() allocates a memory chunk from dax_region with alloc_dax_region(). alloc_dax_region() increases the refcount for dax_region and uses devm_add_action_or_reset() to make the parent dev manage the dax_region. The dax_region will be used if the parent dev is destroyed. Then the

[PATCH] dax: Fix potential uaf in __dax_pmem_probe()

2022-06-23 Thread Jianglei Nie
__dax_pmem_probe() allocates a memory chunk from dax_region with alloc_dax_region(). alloc_dax_region() increases the refcount for dax_region and uses devm_add_action_or_reset() to make the parent dev manage the dax_region. The dax_region will be used if the parent dev is destroyed. Then the