Re: [PATCH] vfio/mdev: Fix reference count leak in add_mdev_supported_type.

2020-05-29 Thread Alex Williamson
On Wed, 27 May 2020 21:01:09 -0500 wu000...@umn.edu wrote: > From: Qiushi Wu > > kobject_init_and_add() takes reference even when it fails. > If this function returns an error, kobject_put() must be called to > properly clean up the memory associated with the object. Thus, > replace kfree() by

Re: [PATCH] vfio/mdev: Fix reference count leak in add_mdev_supported_type.

2020-05-29 Thread Kirti Wankhede
On 5/28/2020 12:32 PM, Cornelia Huck wrote: On Wed, 27 May 2020 21:01:09 -0500 wu000...@umn.edu wrote: From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with

Re: [PATCH] vfio/mdev: Fix reference count leak in add_mdev_supported_type.

2020-05-28 Thread Cornelia Huck
On Wed, 27 May 2020 21:01:09 -0500 wu000...@umn.edu wrote: > From: Qiushi Wu > > kobject_init_and_add() takes reference even when it fails. > If this function returns an error, kobject_put() must be called to > properly clean up the memory associated with the object. Thus, > replace kfree() by