Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4607761pxa; Mon, 10 Aug 2020 13:22:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxI/gxpj0kEfNWkGP4cAmxt0jdZU3L/91GDPggIjPF7a3c4AxEG46YHVybermTQZjAh9B5y X-Received: by 2002:a05:6402:1855:: with SMTP id v21mr23356538edy.355.1597090969934; Mon, 10 Aug 2020 13:22:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597090969; cv=none; d=google.com; s=arc-20160816; b=1IgHFlB9oqI2BHGXiDPfeURRGWkyHIK39INefKQvxfvp4T12Ca/U6ohuKUaHKZ60kj qtiJK5gNuxew9DqaYaLbH9/hBHmht1BJSRrbJI6C0tGH0rGDV/MZPAQMvLhqGT/wS4rR /5OvsESpx/CaSFYigyvqOYHRMWHKQdPxFBfLFn66/naavAuVui/HBwgLpWADL18G1t6v IA2K6mHsgazyGLaX7aGsiUqWfgDYVNoERzAzjbULnENhPxCHJi2S7cSqVmEO7Hv9bg2I 42KU19Q26+dDYvuHxflDuNmiqXh1tSkdnHeugHMIdL8Kcow9Hjs0YbwstoDfNeXKfwJG jq2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Xmfb8zsAkxfDxo5q9Pvfw9Rt6fPeNww71CuPr1jQ9xM=; b=NJzCGoxv/mG4+xc9YbgLI5drBFXcAgA2M0sxLc7dFQHpNPnStb34Akl+3zxpxKCkwZ 3IQguXG38U16f81+3kRNPPW+IIX1NcT0VZLb1XrNT4dZFGscLLjDdAK6E0Fhl60ObGgj PJZ8WciY7h9LZMbOcSrfGx/uy2wHso2oaLLUGxImQwV/M/b6Xp/FehiaKEyFF6hL3Wht 3bXWqj5FUs5nf+VyD7rgosBguyIrnMOCQhaaT0rXhWa/uGcCJ7OhKQQMM4QSHv5Kz4BN oK8JKg7j3Ej4uvlmS/TxuPjeGJMZ8w84MNtYMiLPphkoNOHC4vHMHibhoM64Vrjo/WUo SxzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=rgvoc4Ti; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e11si10923284ejc.49.2020.08.10.13.22.24; Mon, 10 Aug 2020 13:22:49 -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=@rere.qmqm.pl header.s=1 header.b=rgvoc4Ti; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726505AbgHJUSu (ORCPT + 99 others); Mon, 10 Aug 2020 16:18:50 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:61329 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726115AbgHJUSt (ORCPT ); Mon, 10 Aug 2020 16:18:49 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4BQS3D1L69z2d; Mon, 10 Aug 2020 22:18:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1597090728; bh=Xmfb8zsAkxfDxo5q9Pvfw9Rt6fPeNww71CuPr1jQ9xM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rgvoc4TiD576FsrwhADojhjnndnhMNkW97NwSKRuGuqTgX3znuOb/tJD66X92TkfT 0x3lSxY/hcObGOORQUvZ03OkuXS8X25Khr9rXR3wQ897Ye0wyrOy9B8yN/eOaleBQi ZpMiKXxvWmzOvxPOSY8wNx/PAcbxr8Fz8sadENyNPi9k5EEDYgn2w14Rx1G0GJQHW6 MfuN54EdrePCJQnw8mfKCRerD+iBGBHvhNHzE57Af4kaRORK7F6OCY8Di6N6XV/NXv vc4vAyz/oUj0JO0n0hZlVep0HXyPLKIqmu9KTpCadZyrXlZ+L/r3M0CWw6rILgN24C AfR4U7yhtsatg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at mail Date: Mon, 10 Aug 2020 22:18:46 +0200 From: =?iso-8859-2?Q?Micha=B3_Miros=B3aw?= To: Dmitry Osipenko Cc: Mark Brown , Liam Girdwood , linux-kernel@vger.kernel.org Subject: Re: regulator: deadlock vs memory reclaim Message-ID: <20200810201846.GA12091@qmqm.qmqm.pl> References: <9a5c8ca6-2027-4d89-e290-6db564b99962@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9a5c8ca6-2027-4d89-e290-6db564b99962@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 10, 2020 at 11:15:28PM +0300, Dmitry Osipenko wrote: > 10.08.2020 23:09, Michał Mirosław пишет: > > At first I also thought so, but there's more. Below is a lockdep > > complaint with your patch applied. I did a similar patch and then two more > > (following) and that is still not enough (sysfs/debugfs do allocations, > > too). > Then it should be good to move the locking for init_coupling() like I > suggested and use GFP_NOWAIT for the two other cases. It all could be a > single small patch. Could you please check whether GFP_NOWAIT helps? This would be equivalent to my patches. Problem with sysfs and debugfs remains as they don't have the option of GFP_NOWAIT. This needs to be moved outside of the locks. Best Regards, Michał Mirosław