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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b4ade32d-30b0-5b8d-5384-971b78fcfc6c@huawei.com>
Date:   Tue, 14 Sep 2021 10:53:04 +0100
From:   John Garry <john.garry@...wei.com>
To:     Zenghui Yu <yuzenghui@...wei.com>, <linux-scsi@...r.kernel.org>,
        <linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <fujita.tomonori@....ntt.co.jp>, <axboe@...nel.dk>,
        <martin.petersen@...cle.com>, <hch@....de>,
        <gregkh@...uxfoundation.org>, <johan@...nel.org>,
        <wanghaibin.wang@...wei.com>
Subject: Re: [PATCH v2] scsi: bsg: Fix device unregistration

On 11/09/2021 11:53, Zenghui Yu wrote:
> We use device_initialize() to take refcount for the device but forget to
> put_device() on device teardown, which ends up leaking private data of the
> driver core, dev_name(), etc. This is reported by kmemleak at boot time if
> we compile kernel with DEBUG_TEST_DRIVER_REMOVE.
> 
> Note that adding the missing put_device() is_not_  sufficient to fix device
> unregistration. As we don't provide the .release() method for device, which
> turned out to be typically wrong and will be complained loudly by the
> driver core.
> 
> Fix both of them.
> 
> Fixes: ead09dd3aed5 ("scsi: bsg: Simplify device registration")
> Signed-off-by: Zenghui Yu<yuzenghui@...wei.com>


FWIW,

Tested-by: John Garry <john.garry@...wei.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ