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: <20220311151957.GA39518@anparri>
Date:   Fri, 11 Mar 2022 16:19:57 +0100
From:   Andrea Parri <parri.andrea@...il.com>
To:     "Michael Kelley (LINUX)" <mikelley@...rosoft.com>
Cc:     KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
        Tianyu Lan <Tianyu.Lan@...rosoft.com>,
        Long Li <longli@...rosoft.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Drivers: hv: vmbus: Fix initialization of device object
 in vmbus_device_register()

> > ---
> >  drivers/hv/vmbus_drv.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > index 12a2b37e87f30..65db5048b1763 100644
> > --- a/drivers/hv/vmbus_drv.c
> > +++ b/drivers/hv/vmbus_drv.c
> > @@ -2097,6 +2097,9 @@ int vmbus_device_register(struct hv_device
> > *child_device_obj)
> >  	child_device_obj->device.parent = &hv_acpi_dev->dev;
> >  	child_device_obj->device.release = vmbus_device_release;
> > 
> > +	child_device_obj->device.dma_parms = &child_device_obj->dma_parms;
> > +	child_device_obj->device.dma_mask = &child_device_obj->dma_mask;
> > +
> >  	/*
> >  	 * Register with the LDM. This will kick off the driver/device
> >  	 * binding...which will eventually call vmbus_match() and vmbus_probe()
> > @@ -2122,8 +2125,6 @@ int vmbus_device_register(struct hv_device
> > *child_device_obj)
> >  	}
> >  	hv_debug_add_dev_dir(child_device_obj);
> > 
> > -	child_device_obj->device.dma_parms = &child_device_obj->dma_parms;
> > -	child_device_obj->device.dma_mask = &child_device_obj->dma_mask;
> >  	dma_set_mask(&child_device_obj->device, DMA_BIT_MASK(64));
> 
> Is there any reason to not move dma_set_mask() as well?  That call is
> closely related to the previous two lines, so it is unexpected to have
> them separated.

The only reason was "minimize diff"; sounds like I'll move it in v2.  ;-)

Thanks,
  Andrea 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ