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] [thread-next>] [day] [month] [year] [list]
Message-ID: <a5024a02-adfb-c027-7a40-417cc10911af@sandisk.com>
Date:	Wed, 22 Jun 2016 08:20:04 +0200
From:	Bart Van Assche <bart.vanassche@...disk.com>
To:	Dan Williams <dan.j.williams@...el.com>,
	"axboe@...com" <axboe@...com>
CC:	"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
	"Richard Weinberger" <richard@....at>,
	Jeff Dike <jdike@...toit.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
	"hch@....de" <hch@....de>
Subject: Re: [PATCH v4 3/5] um: track 'parent' device in a local variable

On 06/21/2016 10:47 PM, Dan Williams wrote:
> In preparation for the removal of 'driverfs_dev' from 'struct gendisk'
> use a local variable to track the parented vs un-parented case in
> ubd_disk_register().
>
> Cc: Jeff Dike <jdike@...toit.com>
> Cc: Richard Weinberger <richard@....at>
> Reported-by: Bart Van Assche <bart.vanassche@...disk.com>
> Signed-off-by: Dan Williams <dan.j.williams@...el.com>
> ---
>  arch/um/drivers/ubd_kern.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
> index ef6b4d960bad..8ec7b4112f55 100644
> --- a/arch/um/drivers/ubd_kern.c
> +++ b/arch/um/drivers/ubd_kern.c
> @@ -801,6 +801,7 @@ static void ubd_device_release(struct device *dev)
>  static int ubd_disk_register(int major, u64 size, int unit,
>  			     struct gendisk **disk_out)
>  {
> +	struct device *dev = NULL;
>  	struct gendisk *disk;
>
>  	disk = alloc_disk(1 << UBD_SHIFT);
> @@ -823,12 +824,12 @@ static int ubd_disk_register(int major, u64 size, int unit,
>  		ubd_devs[unit].pdev.dev.release = ubd_device_release;
>  		dev_set_drvdata(&ubd_devs[unit].pdev.dev, &ubd_devs[unit]);
>  		platform_device_register(&ubd_devs[unit].pdev);
> -		disk->driverfs_dev = &ubd_devs[unit].pdev.dev;
> +		dev = &ubd_devs[unit].pdev.dev;
>  	}
>
>  	disk->private_data = &ubd_devs[unit];
>  	disk->queue = ubd_devs[unit].queue;
> -	add_disk(disk);
> +	device_add_disk(dev, disk);
>
>  	*disk_out = disk;
>  	return 0;

Hello Dan,

The Reported-by tag is intended to give people credit who find bugs in 
the upstream kernel. What I reported was a bug not in the upstream 
kernel but in a previous version of this patch series so I think the 
"Reported-by" tag can be left out from this patch.

Additionally, please consider to use a more descriptive name instead of 
"dev", e.g. "parent".

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ