Re: [PATCH v3 1/2] nvdimm: Fix devs leaks in scan_labels()

2024-08-21 Thread Ira Weiny
Li Zhijian wrote: > scan_labels() leaks memory when label scanning fails and it falls back > to just creating a default "seed" namespace for userspace to configure. > Root can force the kernel to leak memory. > > Allocate the minimum resources unconditionally and release them when > unneeded to av

[PATCH v3 1/2] nvdimm: Fix devs leaks in scan_labels()

2024-08-18 Thread Li Zhijian
scan_labels() leaks memory when label scanning fails and it falls back to just creating a default "seed" namespace for userspace to configure. Root can force the kernel to leak memory. Allocate the minimum resources unconditionally and release them when unneeded to avoid the memory leak. A kmemle