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: <20150119094525.GK21886@x1>
Date:	Mon, 19 Jan 2015 09:45:25 +0000
From:	Lee Jones <lee.jones@...aro.org>
To:	Roger Tseng <rogerable@...ltek.com>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org,
	driverdev-devel@...uxdriverproject.org, wei_wang@...lsil.com.cn,
	micky_ching@...lsil.com.cn
Subject: Re: [PATCH 1/2] mfd: rtsx_usb: Fix runtime PM deadlock

On Thu, 15 Jan 2015, Roger Tseng wrote:

> sd_set_power_mode() in derived module drivers/mmc/host/rtsx_usb_sdmmc.c
> acquires dev_mutex and then calls pm_runtime_get_sync() to make sure the
> device is awake while initializing a newly inserted card. Once it is
> called during suspending state and explicitly before rtsx_usb_suspend()
> acquires the same dev_mutex, both routine deadlock and further hang the
> driver because pm_runtime_get_sync() waits the pending PM operations.
> 
> Fix this by using an empty suspend method. mmc_core always turns the
> LED off after a request is done and thus it is ok to remove the only
> rtsx_usb_turn_off_led() here.
> 
> Cc: <stable@...r.kernel.org> # v3.16+
> Fixes: 730876be2566 ("mfd: Add realtek USB card reader driver")
> Signed-off-by: Roger Tseng <rogerable@...ltek.com>
> ---
>  drivers/mfd/rtsx_usb.c | 9 ---------
>  1 file changed, 9 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/rtsx_usb.c b/drivers/mfd/rtsx_usb.c
> index dbdd0faeb6ce..076694126e5d 100644
> --- a/drivers/mfd/rtsx_usb.c
> +++ b/drivers/mfd/rtsx_usb.c
> @@ -687,15 +687,6 @@ static int rtsx_usb_suspend(struct usb_interface *intf, pm_message_t message)
>  	dev_dbg(&intf->dev, "%s called with pm message 0x%04x\n",
>  			__func__, message.event);
>  
> -	/*
> -	 * Call to make sure LED is off during suspend to save more power.
> -	 * It is NOT a permanent state and could be turned on anytime later.
> -	 * Thus no need to call turn_on when resunming.
> -	 */
> -	mutex_lock(&ucr->dev_mutex);
> -	rtsx_usb_turn_off_led(ucr);
> -	mutex_unlock(&ucr->dev_mutex);
> -
>  	return 0;
>  }
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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