Bug#625804: rtc/mc13xxx: don't call rtc_device_register with the lock held
On Fri, May 06, 2011 at 11:57:47AM +0200, Uwe Kleine-König wrote:
> diff --git a/drivers/rtc/rtc-mc13xxx.c b/drivers/rtc/rtc-mc13xxx.c
> index c5ac037..a1a278b 100644
> --- a/drivers/rtc/rtc-mc13xxx.c
> +++ b/drivers/rtc/rtc-mc13xxx.c
> @@ -349,11 +349,15 @@ static int __devinit mc13xxx_rtc_probe(struct platform_device *pdev)
> if (ret)
> goto err_alarm_irq_request;
>
> + mc13xxx_unlock(mc13xxx);
> +
> priv->rtc = rtc_device_register(pdev->name,
> &pdev->dev, &mc13xxx_rtc_ops, THIS_MODULE);
> if (IS_ERR(priv->rtc)) {
> ret = PTR_ERR(priv->rtc);
>
> + mc13xxx_lock(mc13xxx);
> +
> mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_TODA, priv);
> err_alarm_irq_request:
>
> @@ -365,12 +369,12 @@ err_reset_irq_status:
> mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_RTCRST, priv);
> err_reset_irq_request:
>
> + mc13xxx_unlock(mc13xxx);
> +
> platform_set_drvdata(pdev, NULL);
> kfree(priv);
> }
>
> - mc13xxx_unlock(mc13xxx);
> -
> return ret;
> }
>
>
http://patchwork.ozlabs.org/patch/94354/
thanks! i just tested and confirmed that this patch also resolves the issue.
live well,
vagrant
Reply to: