Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4503014ybb; Tue, 14 Apr 2020 08:32:10 -0700 (PDT) X-Google-Smtp-Source: APiQypJvQT7bYhFUUC4g27mxPlXmtwRjXNzSURB5niPh4HKeqPERRV/7aw/RxWhi/4N9C+J4MyGu X-Received: by 2002:a17:906:30c5:: with SMTP id b5mr746107ejb.102.1586878330330; Tue, 14 Apr 2020 08:32:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586878330; cv=none; d=google.com; s=arc-20160816; b=HUjkd8DUXtGteOcg3auwONkjERFC2iSqi4RmQd5+Vy7Psa9NUHiRl4XvmCLrxgXfUB PMckgHs6mvM2OI8ZQXOK63TQDVn9bSaT9cg7haJ6dwPuv1mM4jHiTKyJgC9xBfSW+O1E Th3Bhl4W1lgJRSr0TGrN1PxE3rITzGzGkPKn5O5kj4ajEX3o0Wb/POLP8QGXsf2EmivG mcFy4R3uy705Cj9AiLiEheoZG1TZYEExmz+xs6IwFCY+SzP0i5d+uFYQquBZeNGLYrGA 27opGuFFvODVk0cUHSa6r+OyFaugpBME7XUgIeyDd8bzy6ko7z0SpVufUHMWoU0Ymc+J EpBg== 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=oMYbOdpo+9J1ouSM2RLjgqda5qd9JwHSLPm5KH5iBRA=; b=DCxZnUx1DTrX64tGAmE1Z2OKxHlhJc9oFYA0YnyxRuJjzo3Iri8jxGfxKI/QFz7M9Y GEIjcp5GRAdq8wH8krUR1WARKdvhFO90NObl2da5u0xYDzinFz/zVvTADf4m1PecIb1r a5plwZVd2Pa65nBgkV21O85RsF1hsnKqf4NBxRu4neJIJLw/oWzVJoNJIgLc8YJIZVa4 MAPRm73VvY0qSZ+MCT4GfpJdBNj9Iyctc+g7ESiyaiZVDpgUUS3wxLto9hX6Fx8ZXiii hNfBOnBAW70icuGRpOO9bQJF0idyQt2L8sHzGfCwqMWNPY6dQ0xAaANCaPO6qlL/Ofif PhOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=OL87gJfF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si4865493ejd.3.2020.04.14.08.31.46; Tue, 14 Apr 2020 08:32:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=OL87gJfF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2501919AbgDNM1E (ORCPT + 99 others); Tue, 14 Apr 2020 08:27:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2501912AbgDNM1B (ORCPT ); Tue, 14 Apr 2020 08:27:01 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98CBDC061A0F for ; Tue, 14 Apr 2020 05:27:01 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id g74so12851142qke.13 for ; Tue, 14 Apr 2020 05:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=oMYbOdpo+9J1ouSM2RLjgqda5qd9JwHSLPm5KH5iBRA=; b=OL87gJfF0Lai5QA/wkTraFaZeOSO+QXBHPXq0YlRcK9vzbCcbJbbNygT9g3JoYpxX9 UmzBQJJBdQFeP5Ik+CjapitA0S0n7Gyj+lqyQv7FVz0I6aIl75ayTu0PXTUkVT50oymk tCVguHZuWurqV7A5lm1gDhOiYLsEbWR/U7Z1fATYeLq0UDSi616BDI1FGmcybn5vJgxN xaQr/YKAsAWKDoO5xR3wtcK3d3oKrUPZRp2ydp2mqDCXRSEXRD6cQT90GhQvHWzqzebr 0A/VTHHpJQSx3lnhSlYl6ugxjCZocDuLwfU6xPARV3Z9BLcrWicByovFwVB40bBq1JOm 8trg== 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=oMYbOdpo+9J1ouSM2RLjgqda5qd9JwHSLPm5KH5iBRA=; b=NE4S+MzJRsUU/8Rz9wd5lxlWklcgy3GQ/+Gq4D0f8KEL0IpyL0zPKeksdl8hvhdi2n T4y4LPIBFxdNFkhco1hQqLBdhzDJsYNyChgue5SIOdUk3cSix0iU78azbeEGNn2+0K92 8wX37Es19eS6WlaLFuwe8hA13jA7unaDn8rZBWTx/n7XOYipeMfsTVAnNJmNQ/hPjtFm Hsdv0Y5Dp0+hK5yZ2tqDo/TxlQedvj+sMFqvVCnUcgXJxk05Xn8YE+vY/RgXp9YY22AH p4txDj4GX4ixwhsToAbIMJFYpghinu5mj6Ve2b7nJGAsXCUsa1hAWEsrM1cKVWfE93ON macQ== X-Gm-Message-State: AGi0PuYxxUTKaiKIm/dgMGgEkGIrIyMTuD4thNMYj4ZQO9B3P0jsrHwz Zdq9qXWEGWVp1haG0Sr1blyJh/KbWbf/memJsXn9gMd8 X-Received: by 2002:a05:620a:1289:: with SMTP id w9mr6020359qki.263.1586867220834; Tue, 14 Apr 2020 05:27:00 -0700 (PDT) MIME-Version: 1.0 References: <20200320093125.23092-1-brgl@bgdev.pl> In-Reply-To: From: Bartosz Golaszewski Date: Tue, 14 Apr 2020 14:26:49 +0200 Message-ID: Subject: Re: [PATCH] gpiolib: don't call sleeping functions with a spinlock taken To: Linus Walleij 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 wt., 14 kwi 2020 o 14:00 Linus Walleij napisa=C5= =82(a): > > On Fri, Mar 20, 2020 at 10:31 AM Bartosz Golaszewski wrot= e: > > > 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 situation > > can change but it isn't a regression either: previously this part wasn'= 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 setting= 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? Bart