From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1A7CC433EF for ; Mon, 18 Jun 2018 09:14:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 984E720652 for ; Mon, 18 Jun 2018 09:14:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 984E720652 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966900AbeFRJOj (ORCPT ); Mon, 18 Jun 2018 05:14:39 -0400 Received: from muru.com ([72.249.23.125]:47682 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966626AbeFRJOg (ORCPT ); Mon, 18 Jun 2018 05:14:36 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 9DE138081; Mon, 18 Jun 2018 09:17:17 +0000 (UTC) Date: Mon, 18 Jun 2018 02:14:33 -0700 From: Tony Lindgren To: Andy Shevchenko Cc: "H. Nikolaus Schaller" , "open list:GPIO SUBSYSTEM" , Linus Walleij , Linux Kernel Mailing List , kernel@pyra-handheld.com, Discussions about the Letux Kernel Subject: Re: [Letux-kernel] BUG: drivers/pinctrl/core: races in pinctrl_groups and deferred probing Message-ID: <20180618091433.GP112168@atomide.com> References: <20180614120157.GE112168@atomide.com> <20180615065810.GI112168@atomide.com> <20180615111318.GJ112168@atomide.com> <029F115C-480E-485A-B547-9D5873925CEF@goldelico.com> <4DE2E482-B0D3-4799-9E2D-74E2180B305B@goldelico.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Shevchenko [180618 08:25]: > On Sat, Jun 16, 2018 at 2:08 PM H. Nikolaus Schaller wrote: > > But it looks as if we still have duplicate assignments by deferred probing, i.e. some cleanup is > > missing (or is this intended behaviour?). > > > But I think the fundamental problem is that the same driver assigns multiple slots if > > probing is deferred. > > Indeed. > > I think there is a simple way to clean up pinctrl stuff on failed probe. See > https://elixir.bootlin.com/linux/v4.18-rc1/source/drivers/base/dd.c#L416 > > We only bind pins, and do not perform any actions when failure happens later on. Yup seems like a good approach. I'll take a look if we can just check if the function or group name already exists and return the existing selector in that case. Regards, Tony