Messages in this thread | | | Date | Mon, 7 Nov 2022 10:14:24 +0100 | From | Stefano Garzarella <> | Subject | Re: [PATCH] vdpa_sim: fix possible memory leak in vdpasim_net_init() and vdpasim_blk_init() |
| |
On Mon, Nov 07, 2022 at 03:41:42PM +0800, Jason Wang wrote: >On Fri, Nov 4, 2022 at 4:41 PM ruanjinjie <ruanjinjie@huawei.com> wrote: >> >> If device_register() returns error in vdpasim_net_init() or >> vdpasim_blk_init(), name of kobject which is allocated in dev_set_name() >> called in device_add() is leaked. >> >> As comment of device_add() says, it should call put_device() to drop >> the reference count that was set in device_initialize() when it fails, >> so the name can be freed in kobject_cleanup(). >> >> Signed-off-by: ruanjinjie <ruanjinjie@huawei.com> > >Acked-by: Jason Wang <jasowang@redhat.com> > >Should we have a fixes tag and cc stable?
Yep, I think so.
The fixes tags should be:
Fixes: 899c4d187f6a ("vdpa_sim_blk: add support for vdpa management tool") Fixes: a3c06ae158dd ("vdpa_sim_net: Add support for user supported devices")
With them:
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Thanks, Stefano
| |