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: <Yd7bnS/jPQgRPD88@lunn.ch>
Date:   Wed, 12 Jan 2022 14:46:05 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Miaoqian Lin <linmq006@...il.com>
Cc:     kuba@...nel.org, davem@...emloft.net, linux-kernel@...r.kernel.org,
        lipeng321@...wei.com, liuyonglong@...wei.com, mbrugger@...e.com,
        netdev@...r.kernel.org, salil.mehta@...wei.com,
        shenyang39@...wei.com, yisen.zhuang@...wei.com
Subject: Re: [PATCH v2] net: hns: Fix missing put_device() call in
 hns_mac_register_phy

On Wed, Jan 12, 2022 at 10:39:19AM +0000, Miaoqian Lin wrote:
> We need to drop the reference taken by hns_dsaf_find_platform_device
> Missing put_device() may cause refcount leak.

Is the put also missing on driver unload?

As a fix for net, it might be better to rename
dsaf_find_platform_device() to dsaf_get_platform_device() and add a
dsaf_put_platform_device(). Add similar undo functions where ever
needed, and make sure they get called.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ