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>] [day] [month] [year] [list]
Message-id: <4251641.n6Nv53rcYW@amdc1032>
Date:	Fri, 12 Sep 2014 18:34:19 +0200
From:	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To:	dinguyen@...nsource.altera.com
Cc:	paulz@...opsys.com, gregkh@...uxfoundation.org, balbi@...com,
	dinh.linux@...il.com, swarren@...dotorg.org, matthijs@...in.nl,
	r.baldyga@...sung.com, jg1.han@...sung.com,
	sachin.kamat@...aro.org, ben-linux@...ff.org,
	dianders@...omium.org, kever.yang@...k-chips.com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv4 09/12] usb: dwc2: initialize the spin_lock for both host
 and gadget


[ added linux-kernel ML to cc: ]

Hi,

On Tuesday, August 26, 2014 11:20:00 AM dinguyen@...nsource.altera.com wrote:
> From: Dinh Nguyen <dinguyen@...nsource.altera.com>
> 
> Move spin_lock_init to common location for both host and gadget.

This should be done at the same time that gadget/host probing is merged
to preserve bisectability.

Also patch #12 ("usb: dwc2: pci: Update pci portion of the dwc2 driver")
should be merged into this one.

> Signed-off-by: Dinh Nguyen <dinguyen@...nsource.altera.com>
> ---
> v4: move spin_lock_init up to make sure sure no locks can be taken before
>     the init.
> ---
>  drivers/usb/dwc2/hcd.c      | 1 -
>  drivers/usb/dwc2/platform.c | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index 07a7bcd..c6778d9 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -2824,7 +2824,6 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq,
>  
>  	hcd->has_tt = 1;
>  
> -	spin_lock_init(&hsotg->lock);
>  	((struct wrapper_priv_data *) &hcd->hcd_priv)->hsotg = hsotg;
>  	hsotg->priv = hcd;
>  
> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
> index 2871f351..278135d 100644
> --- a/drivers/usb/dwc2/platform.c
> +++ b/drivers/usb/dwc2/platform.c
> @@ -183,6 +183,7 @@ static int dwc2_driver_probe(struct platform_device *dev)
>  
>  	hsotg->dr_mode = of_usb_get_dr_mode(dev->dev.of_node);
>  
> +	spin_lock_init(&hsotg->lock);
>  	if (IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)) {
>  		retval = dwc2_gadget_init(hsotg, irq);
>  		if (retval)

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ