Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1175265ybz; Thu, 16 Apr 2020 04:26:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKYcY++jeRoTvJtx/TRHwp5E9qJetPAH2DlwaWor1qGTO3mdbjtC1gQvk85dRANn1vhw+PA X-Received: by 2002:a17:906:3785:: with SMTP id n5mr9471792ejc.21.1587036391838; Thu, 16 Apr 2020 04:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587036391; cv=none; d=google.com; s=arc-20160816; b=oPjKKH8E0Y7z8sY+94MPS2gNJOcIK8ggPHMRqcnLqWSORVpKD41y+MTmc/9ToiWjxR Mcrx0TqbLKRSynyKnScTrjbsaPRL6rANoHaodnqa+s4K3ReK4mLNaPBiLaNl6uIxTh5q FGuUJ83Uih5HsktFTDGG/Z+gaIQuP4pOJdlgrwn6PFV+AhmHkZwQWSGWBbLVpT1MMTIG jhHoEyM1gqSHsiz4xbB5kzbK+LYHsngst5CdvWJwdmKu3DvYvUfqiKlSZVfnXIAc3js/ ziEDhwUcGqd6f20cHQZesOA6pi7XRmH3f7XTYHKeaUp1EP3TIU6JGiT7Yv2cu44DQxx2 NfXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=NGDiAiHa7gOkZcjetP+fIoZxVSWT0kUGxzHZFTTg7do=; b=BFvDq7bD3oF83X2s0Esm9xKHe9N77B63fCmByQ/0iR2XMR4K2tKExFEaHG/0paand1 P24OQyhtXiEyz9aeAxjsmmO5Yr0atdpcpWG4k2kUj6zogFUiU2ruDAMbZHgC/PpzF0JV rM/UUgiDrpTZUkhzhKPqx1GVe3Eqbz/aCeQxcL8omqogv3ox1oSUWv9dlBUF3FSnWQfa PC5bmd+nNGdRUUZuM6TMn2XUwlolIejGH7CJk7MLd1UshNmmsT6al/EvY0bIfC8OUUhj Qf0ZTyiJYm3KEGjQMLQSr+RBNquiQOeAr0CETrK4PDajV1QUmJDme6jitKPjgDkPIXwQ 7UuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OtzsmKq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q9si12632081ejr.365.2020.04.16.04.26.08; Thu, 16 Apr 2020 04:26:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OtzsmKq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2632936AbgDPLVa (ORCPT + 99 others); Thu, 16 Apr 2020 07:21:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2632917AbgDPLTr (ORCPT ); Thu, 16 Apr 2020 07:19:47 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D12A6C061A0C for ; Thu, 16 Apr 2020 04:19:45 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id e25so886543ljg.5 for ; Thu, 16 Apr 2020 04:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=NGDiAiHa7gOkZcjetP+fIoZxVSWT0kUGxzHZFTTg7do=; b=OtzsmKq4kHVDABFucflRXQScsA5dK0d8y+T7VpIusux0bdbzOkryTGmdsRMejMModx hG+VUUfuAGphGgNl/ZWXlXnkPfKW8XJTUtB2InKKwK+VcmtS133aXqUYztuRFDgCKwYr CuXgPqQNihksSjAt6Quo/CXuja6kdP04P2Gvo1/g98aFnINd6I9yEQ/8pZ1kl2n2D588 7oh3h6PhgI4kgcrI04UrK/gjC7byofTga40iU9XD5p9G/tTD9nCNZdb0xlIsO1aFBAIB 1GMRLSIgOunDZtfkEJg5DwnLQjfuOZf9TkvUJjQS3MjVtW9RVo8n1pZUQ1yFDHuupZdE 870A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=NGDiAiHa7gOkZcjetP+fIoZxVSWT0kUGxzHZFTTg7do=; b=I3k+KDhQeHiOU4JcDC2TY2YAiSFt8LWJU64fgtScVztsIWkt0at2pmemsyrcMkxcNs mTs7zFS+54toHLs021oo04BZh8NK7fuB9BMXfAnnYSQ6Dc42nGMBbgJisX4wn4OvTlWa CmMzALDtZaEIdOwDI5q61cUDSplhAidDqQU0S+NfSSNcaVooMEuw/WcXi7VdgBtcbSBX DDMBBlG3AfiVn+QPxCWZl1baVuzVzSlEuUHQnYPCXuJmhK8kC4scRb6zT+Ro/cqxwOEH EHlHzERn/aX/ODQA+2jdyUcrtdiFvjmHX4P+4nGoUheNFnIhK8pbyQhE5bo9C5hqQ8GA QT0A== X-Gm-Message-State: AGi0PuZb+/FXqnY5TXdNaGZm8pxcq3VGd15T7loLujqfznufyNBmqglM Wm/Ldh/VivuIPWh3FCi5f6uH1k77NIy82ajsYfnhAg== X-Received: by 2002:a2e:5048:: with SMTP id v8mr5663453ljd.99.1587035984361; Thu, 16 Apr 2020 04:19:44 -0700 (PDT) MIME-Version: 1.0 References: <20200320093125.23092-1-brgl@bgdev.pl> In-Reply-To: From: Linus Walleij Date: Thu, 16 Apr 2020 13:19:33 +0200 Message-ID: Subject: Re: [PATCH] gpiolib: don't call sleeping functions with a spinlock taken To: Bartosz Golaszewski Cc: Bartosz Golaszewski , Geert Uytterhoeven , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 14, 2020 at 2:27 PM Bartosz Golaszewski wrote: > wt., 14 kwi 2020 o 14:00 Linus Walleij napisa= =C5=82(a): > > > > On Fri, Mar 20, 2020 at 10:31 AM Bartosz Golaszewski wr= ote: > > > > > From: Bartosz Golaszewski > > > > > > We must not call pinctrl_gpio_can_use_line() with the gpio_lock taken > > > as it takes a mutex internally. Let's move the call before taking the > > > spinlock and store the return value. > > > > > > This isn't perfect - there's a moment between calling > > > pinctrl_gpio_can_use_line() and taking the spinlock where the situati= on > > > can change but it isn't a regression either: previously this part was= n't > > > protected at all and it only affects the information user-space is > > > seeing. > > > > > > Reported-by: Geert Uytterhoeven > > > Fixes: d2ac25798208 ("gpiolib: provide a dedicated function for setti= ng lineinfo") > > > Signed-off-by: Bartosz Golaszewski > > > > I'm sorry that I lost track of this patch :( > > > > Do we still need something like this or has it been fixed > > by some other patches? > > > > Yours, > > Linus Walleij > > Nope, this is still an issue. Do you have a better idea than mine? Nope, can you just queue it in your tree? Acked-by: Linus Walleij Yours, Linus Walleij