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: <20211018101250.GA6754@lst.de>
Date:   Mon, 18 Oct 2021 12:12:50 +0200
From:   Christoph Hellwig <hch@....de>
To:     Zqiang <qiang.zhang1211@...il.com>
Cc:     axboe@...nel.dk, hch@....de, willy@...radead.org,
        sunhao.th@...il.com, hch@...radead.org,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block: fix incorrect references to disk objects

On Mon, Oct 18, 2021 at 05:11:16PM +0800, Zqiang wrote:
> --- a/block/partitions/core.c
> +++ b/block/partitions/core.c
> @@ -424,6 +424,7 @@ static struct block_device *add_partition(struct gendisk *disk, int partno,
>  	device_del(pdev);
>  out_put:
>  	put_device(pdev);
> +	disk = NULL;
>  out_put_disk:
>  	put_disk(disk);
>  	return ERR_PTR(err);

Stylistic nitpick:  I think directly returning where this currently
clears disk would be a little easier to follow.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ