On Mon, Feb 26, 2018 at 02:49:34PM +0000, Parav Pandit wrote: > Hi Leon, > > > -----Original Message----- > > From: Leon Romanovsky [mailto:leon@xxxxxxxxxx] > > Sent: Sunday, February 25, 2018 3:40 AM > > To: Doug Ledford <dledford@xxxxxxxxxx>; Jason Gunthorpe > > <jgg@xxxxxxxxxxxx> > > Cc: Leon Romanovsky <leon@xxxxxxxxxx>; RDMA mailing list <linux- > > rdma@xxxxxxxxxxxxxxx>; Boris Pismenny <borisp@xxxxxxxxxxxx>; Daniel > > Jurgens <danielj@xxxxxxxxxxxx>; Ilya Lesokhin <ilyal@xxxxxxxxxxxx>; > > Laurence Oberman <loberman@xxxxxxxxxx>; Majd Dibbiny > > <majd@xxxxxxxxxxxx>; Moni Shoua <monis@xxxxxxxxxxxx>; Noa Osherovich > > <noaos@xxxxxxxxxxxx>; Parav Pandit <parav@xxxxxxxxxxxx>; Sergey > > Gorenko <sergeygo@xxxxxxxxxxxx>; Yishai Hadas <yishaih@xxxxxxxxxxxx> > > Subject: [PATCH rdma-rc 9/9] IB/core: Fix missing RDMA cgroups release in case > > of failure to register device > > > > From: Parav Pandit <parav@xxxxxxxxxxxx> > > > > During IB device registration process, if query_device() fails or if ib_core fails to > > registers sysfs entries, rdma cgroup cleanup is skipped. > > > > Cc: <stable@xxxxxxxxxxxxxxx> # v4.2+ > rdma cgroup support was added in 4.11 kernel. > Shouldn't stable version be 4.11 or higher? I expected this question, I used the same stable tag as was used in "4be3a4fa51f4 ("IB/core: Fix kernel crash during fail to initialize device")" commit from fixes line. Thanks > > > Fixes: 4be3a4fa51f4 ("IB/core: Fix kernel crash during fail to initialize device") > > Reviewed-by: Daniel Jurgens <danielj@xxxxxxxxxxxx> > > Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx> > > Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx> > > --- > > drivers/infiniband/core/device.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c > > index e8010e73a1cf..bb065c9449be 100644 > > --- a/drivers/infiniband/core/device.c > > +++ b/drivers/infiniband/core/device.c > > @@ -536,14 +536,14 @@ int ib_register_device(struct ib_device *device, > > ret = device->query_device(device, &device->attrs, &uhw); > > if (ret) { > > pr_warn("Couldn't query the device attributes\n"); > > - goto cache_cleanup; > > + goto cg_cleanup; > > } > > > > ret = ib_device_register_sysfs(device, port_callback); > > if (ret) { > > pr_warn("Couldn't register device %s with driver model\n", > > device->name); > > - goto cache_cleanup; > > + goto cg_cleanup; > > } > > > > device->reg_state = IB_DEV_REGISTERED; @@ -559,6 +559,8 @@ int > > ib_register_device(struct ib_device *device, > > mutex_unlock(&device_mutex); > > return 0; > > > > +cg_cleanup: > > + ib_device_unregister_rdmacg(device); > > cache_cleanup: > > ib_cache_cleanup_one(device); > > ib_cache_release_one(device); > > -- > > 2.16.1 >
Attachment:
signature.asc
Description: PGP signature