Re: [PATCH] mmc: core: Don't allocate IDA for OF aliases

2021-04-16 Thread Ulf Hansson
On Fri, 16 Apr 2021 at 19:50, Stephen Boyd wrote: > > Quoting Ulf Hansson (2021-04-16 00:17:10) > > On Thu, 15 Apr 2021 at 21:29, Stephen Boyd wrote: > > > > > > > > > Don't think so. The device (with the kobject inside) is removed, and > > > thus the mmc1 device will be removed, but the kobject'

Re: [PATCH] mmc: core: Don't allocate IDA for OF aliases

2021-04-16 Thread Stephen Boyd
Quoting Ulf Hansson (2021-04-16 00:17:10) > On Thu, 15 Apr 2021 at 21:29, Stephen Boyd wrote: > > > > > > Don't think so. The device (with the kobject inside) is removed, and > > thus the mmc1 device will be removed, but the kobject's release function > > is delayed due to the config. This means t

Re: [PATCH] mmc: core: Don't allocate IDA for OF aliases

2021-04-16 Thread Ulf Hansson
On Thu, 15 Apr 2021 at 21:29, Stephen Boyd wrote: > > Quoting Ulf Hansson (2021-04-15 01:56:12) > > On Tue, 13 Apr 2021 at 02:36, Stephen Boyd wrote: > > > > > > - err = ida_simple_get(&mmc_host_ida, min_idx, max_idx, GFP_KERNEL); > > > - if (err < 0) { > > > - kfree(hos

Re: [PATCH] mmc: core: Don't allocate IDA for OF aliases

2021-04-15 Thread Stephen Boyd
Quoting Ulf Hansson (2021-04-15 01:56:12) > On Tue, 13 Apr 2021 at 02:36, Stephen Boyd wrote: > > > > - err = ida_simple_get(&mmc_host_ida, min_idx, max_idx, GFP_KERNEL); > > - if (err < 0) { > > - kfree(host); > > - return NULL; > > + index =

Re: [PATCH] mmc: core: Don't allocate IDA for OF aliases

2021-04-15 Thread Ulf Hansson
On Tue, 13 Apr 2021 at 02:36, Stephen Boyd wrote: > > There's a chance that the IDA allocated in mmc_alloc_host() is not freed > for some time because it's freed as part of a class' release function > (see mmc_host_classdev_release() where the IDA is freed). If another > thread is holding a refere

[PATCH] mmc: core: Don't allocate IDA for OF aliases

2021-04-12 Thread Stephen Boyd
There's a chance that the IDA allocated in mmc_alloc_host() is not freed for some time because it's freed as part of a class' release function (see mmc_host_classdev_release() where the IDA is freed). If another thread is holding a reference to the class, then only once all balancing device_put() c