Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932673Ab3E0N5Y (ORCPT ); Mon, 27 May 2013 09:57:24 -0400 Received: from mail-ie0-f175.google.com ([209.85.223.175]:34195 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932514Ab3E0N5O (ORCPT ); Mon, 27 May 2013 09:57:14 -0400 MIME-Version: 1.0 In-Reply-To: References: <1366988907-13485-1-git-send-email-linus.walleij@stericsson.com> Date: Mon, 27 May 2013 15:57:13 +0200 Message-ID: Subject: Re: [PATCH v3] pinctrl: move subsystem mutex to pinctrl_dev struct From: Linus Walleij To: James Hogan Cc: Linus Walleij , Patrice Chotard , LKML , "linux-arm-kernel@lists.infradead.org" , Stephen Warren , Anmar Oueja , Laurent Meunier Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1354 Lines: 36 On Fri, May 24, 2013 at 5:22 PM, James Hogan wrote: > On 26 April 2013 16:08, Linus Walleij wrote: >> @@ -608,7 +610,7 @@ static int pinconf_dbg_config_print(struct seq_file *s, void *d) >> bool found = false; >> unsigned long config; >> >> - mutex_lock(&pinctrl_mutex); >> + mutex_lock(&pctldev->mutex); >> >> /* Parse the pinctrl map and look for the elected pin/state */ >> for_each_maps(maps_node, i, map) { > > This change causes an oops on v3.10-rc2 when you read pinconf-config > because pctldev is initialised to NULL and not set until inside the > loop. It is taking the wrong mutex. The function right below it is also iterating the maps, and then it shall take the maps mutex and nothing else. I just sent a patch fixing it up. > If this debugfs file > isn't meant to be specific to a pinctrl device should it be in the > root pinctrl directory instead of in each pinctrl device's directory? Yes. We need to fix this after this immediate fixup, for the next merge window. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/