Re: [PATCH] dax/hmem: Fix refcount leak in dax_hmem_probe()

2023-06-02 Thread Dan Williams
Paul Cassella wrote: > On Fri, 2 Jun 2023, Ira Weiny wrote: > > Paul Cassella wrote: > > > On Sat, 3 Dec 2022, Ira Weiny wrote: > > > > On Sat, Dec 03, 2022 at 09:58:58AM +, Yongqiang Liu wrote: > > > > > > We should always call dax_region_put() whenever devm_create_dev_dax() > > > > > succeed

Re: [PATCH] dax/hmem: Fix refcount leak in dax_hmem_probe()

2023-06-02 Thread Ira Weiny
Paul Cassella wrote: > On Fri, 2 Jun 2023, Ira Weiny wrote: > > Paul Cassella wrote: > > > On Sat, 3 Dec 2022, Ira Weiny wrote: > > > > On Sat, Dec 03, 2022 at 09:58:58AM +, Yongqiang Liu wrote: > > > > > > We should always call dax_region_put() whenever devm_create_dev_dax() > > > > > succeed

Re: [PATCH] dax/hmem: Fix refcount leak in dax_hmem_probe()

2023-06-02 Thread Paul Cassella
On Fri, 2 Jun 2023, Ira Weiny wrote: > Paul Cassella wrote: > > On Sat, 3 Dec 2022, Ira Weiny wrote: > > > On Sat, Dec 03, 2022 at 09:58:58AM +, Yongqiang Liu wrote: > > > > We should always call dax_region_put() whenever devm_create_dev_dax() > > > > succeed or fail to avoid refcount leak of

Re: [PATCH] dax/hmem: Fix refcount leak in dax_hmem_probe()

2023-06-02 Thread Ira Weiny
Paul Cassella wrote: > On Sat, 3 Dec 2022, Ira Weiny wrote: > > On Sat, Dec 03, 2022 at 09:58:58AM +, Yongqiang Liu wrote: > > > > We should always call dax_region_put() whenever devm_create_dev_dax() > > > succeed or fail to avoid refcount leak of dax_region. Move the return > > > value check

Re: [PATCH] dax/hmem: Fix refcount leak in dax_hmem_probe()

2023-06-01 Thread Paul Cassella
On Sat, 3 Dec 2022, Ira Weiny wrote: > On Sat, Dec 03, 2022 at 09:58:58AM +, Yongqiang Liu wrote: > > We should always call dax_region_put() whenever devm_create_dev_dax() > > succeed or fail to avoid refcount leak of dax_region. Move the return > > value check after dax_region_put(). > I thi

Re: [PATCH] dax/hmem: Fix refcount leak in dax_hmem_probe()

2022-12-06 Thread Yongqiang Liu
在 2022/12/4 4:49, Ira Weiny 写道: On Sat, Dec 03, 2022 at 09:58:58AM +, Yongqiang Liu wrote: We should always call dax_region_put() whenever devm_create_dev_dax() succeed or fail to avoid refcount leak of dax_region. Move the return value check after dax_region_put(). I think dax_region_put

Re: [PATCH] dax/hmem: Fix refcount leak in dax_hmem_probe()

2022-12-03 Thread Ira Weiny
On Sat, Dec 03, 2022 at 09:58:58AM +, Yongqiang Liu wrote: > We should always call dax_region_put() whenever devm_create_dev_dax() > succeed or fail to avoid refcount leak of dax_region. Move the return > value check after dax_region_put(). I think dax_region_put is called from dax_region_unre

[PATCH] dax/hmem: Fix refcount leak in dax_hmem_probe()

2022-12-03 Thread Yongqiang Liu
We should always call dax_region_put() whenever devm_create_dev_dax() succeed or fail to avoid refcount leak of dax_region. Move the return value check after dax_region_put(). Fixes: c01044cc8191 ("ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device") Signed-off-by: Yongqiang