lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220207175455.ftlpbzzuq5wqducc@liuwe-devbox-debian-v2>
Date:   Mon, 7 Feb 2022 17:54:55 +0000
From:   Wei Liu <wei.liu@...nel.org>
To:     Juan Vazquez <juvazq@...ux.microsoft.com>
Cc:     Miaoqian Lin <linmq006@...il.com>, decui@...rosoft.com,
        gregkh@...uxfoundation.org, haiyangz@...rosoft.com,
        kys@...rosoft.com, linux-hyperv@...r.kernel.org,
        linux-kernel@...r.kernel.org, sthemmin@...rosoft.com,
        wei.liu@...nel.org
Subject: Re: [PATCH v2] Drivers: hv: vmbus: Fix memory leak in
 vmbus_add_channel_kobj

On Sun, Feb 06, 2022 at 06:55:56AM -0800, Juan Vazquez wrote:
> On Fri, Feb 04, 2022 at 01:30:08AM +0800, Miaoqian Lin wrote:
> > kobject_init_and_add() takes reference even when it fails.
> > According to the doc of kobject_init_and_add():
> > 
> >    If this function returns an error, kobject_put() must be called to
> >    properly clean up the memory associated with the object.
> > 
> > Fix memory leak by calling kobject_put().
> > 
> > Fixes: c2e5df616e1a ("vmbus: add per-channel sysfs info")
> > Signed-off-by: Miaoqian Lin <linmq006@...il.com>
> > ---
> > Changes in v2:
> > - Add cleanup when sysfs_create_group() fails
> > 
> > kobject_uevent() is used for notifying userspace by sending an uevent,
> > I don't think we need to do error handling for it.
> 
> Thanks for the patch. It looks good to me.
> 
> Reviewed-by: Juan Vazquez <juvazq@...ux.microsoft.com>

Applied to hyperv-fixes. Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ