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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YkU/6KB+0fPU5Hie@infradead.org>
Date:   Wed, 30 Mar 2022 22:45:12 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Wenchao Hao <haowenchao@...wei.com>, fmdefrancesco@...il.com,
        axboe@...nel.dk, jejb@...ux.ibm.com, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
        martin.petersen@...cle.com,
        syzbot+f08c77040fa163a75a46@...kaller.appspotmail.com,
        syzkaller-bugs@...glegroups.com, linfeilong@...wei.com
Subject: Re: [PATCH] scsi: sd: call device_del() if device_add_disk() fails

> The temptation was to call device_unregister() which is a combined
> device_del(); device_put(); but when the device_initialize() and
> device_add() are called separately, then I think it is more readable to
> call del and put separately as well.

I think we should also consolidate the initialization side.  Using
device_register and device_unregister would have prevented this bug
and I should have switched to that before refactoring the code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ