2013-04-26 17:03:45

by Daniel Mack

[permalink] [raw]
Subject: [PATCH, for-next] pinctrl: fix mutex deadlock in get_pinctrl_dev_from_of_node()

This obvious bug was introduced by d755910b7 ("pinctrl: move subsystem
mutex to pinctrl_dev struct").

Signed-off-by: Daniel Mack <[email protected]>
---
This applies on today's linux-next.

drivers/pinctrl/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 37cd774..78eae4d 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -129,7 +129,7 @@ struct pinctrl_dev *get_pinctrl_dev_from_of_node(struct device_node *np)
return pctldev;
}

- mutex_lock(&pinctrldev_list_mutex);
+ mutex_unlock(&pinctrldev_list_mutex);

return NULL;
}
--
1.8.1.4


2013-04-29 12:47:42

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH, for-next] pinctrl: fix mutex deadlock in get_pinctrl_dev_from_of_node()

On Fri, Apr 26, 2013 at 6:57 PM, Daniel Mack <[email protected]> wrote:

> This obvious bug was introduced by d755910b7 ("pinctrl: move subsystem
> mutex to pinctrl_dev struct").
>
> Signed-off-by: Daniel Mack <[email protected]>

Thanks, patch applied.

Yours,
Linus Walleij