Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp96424pxa; Tue, 11 Aug 2020 18:33:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVNlRrvks5KfPv+CVGBFB7cB3p27rL/lU2z13qXKsf1TRfcgLi1UCiUFhEJzUiKdrHCoQ2 X-Received: by 2002:a05:6402:456:: with SMTP id p22mr27932239edw.177.1597196029884; Tue, 11 Aug 2020 18:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597196029; cv=none; d=google.com; s=arc-20160816; b=yuDE1r1OhEKS7a/LrrcA0b6im3w+/wwEWbkteqEQXBCUo6I5uOf6fuZeHQ7mFEFBuW ywA/B1lqRRqDMg/JHfOoCyC6sHLAMAlf99cFfJtaPT6xQx1W6C5pIgQQ2CDxqDHNqzxG sTh+T/z6samq4XaVOHNjj4BkpcEbJKxkBPkDlaqV2PaD+phev14ttus1PSmE4LtNkDAt rXVNyeSSMcTrIjs/1Dy9ir3ELmpW3xb2yCNEjSgMA4Y8CzoAPB0C/dw1cOQQKrv0qEiR j1C2cPO4yB8WXYBqsSxZvuSmyQzLA75SkGlHdTUkNkbXQkx/oDllRUSDdIQ1VV0z1lyX OmSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:content-transfer-encoding :mime-version:subject:from:message-id:date:dkim-signature; bh=TBqEguAdKdq4sOwgiNfS1IRsZ3TEcxAKr0NPGd/TZyI=; b=ckhQ+zrTs4k5ovPrC3vaDq12nP4lI3pKt3q0Q3Q+4zBosun8zTbekfQZ6jcJ6wAcgR eqvhXL/h+WVp9pbCd0PE8XObryBm6MbwyPy619XZXOd9ICpWh89WbeXzrJEdGMkOONTx vGM5NpAXnvLsiDHoyvXBlkpuoAwi2JRrM6OCwhx0gxYAFsYzPVQC0guD62f5tEukw9e1 5EC7iEjC9BpKXY9y/roJkIkyHh1mayPaW9TrlOUUysiuxxCJeayry6KCoQews3l16HMY iKw5WGQPz9uycz9tSdanerGfW9m8IEtnR2TyQF73kUfVy5v/5EQKLwhAT5/ZiU4yqfRb lXbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=alJCAr0f; 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 r21si383040edc.313.2020.08.11.18.33.26; Tue, 11 Aug 2020 18:33: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=alJCAr0f; 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 S1726512AbgHLBbg (ORCPT + 99 others); Tue, 11 Aug 2020 21:31:36 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:26779 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726235AbgHLBbg (ORCPT ); Tue, 11 Aug 2020 21:31:36 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4BRBxf0kNvz8r; Wed, 12 Aug 2020 03:31:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1597195894; bh=KiohsbLXRM1ii8+BcDQdtCQAhTchsGUVHj1dkF0VDaE=; h=Date:From:Subject:To:Cc:From; b=alJCAr0fQw0M6FVX28BBbRtXKTOV4J/PvQwkNxVa1DF8r+rUqljXxZPlP87KMY0db TXstkFi9pkMd59OlzCmiEvBOfiNajiKxohYxYAJohPz7ek+ZPEBWsiTt7v89fOqDH7 dYUNJ0/4jm41FOAzpKLrJib/Ehb41ZM0TcAH6cHFOurJXtf+IWPss7jrkTkPy4xv/l O5waxQG+mqF8JU7rGZQGtdTNymFpBCtVxWNmeZHL7Bc4EYWhBbQ99Iom71kgGG97wx UVTBocvLmlBkcesQSBH9E3iK68BSw9/YdjZl+QAo4g2KssS9TiBQ1siUAKsYhrxHk4 +347V+2njHwvA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at mail Date: Wed, 12 Aug 2020 03:31:31 +0200 Message-Id: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH v2 0/7] regulator: fix deadlock vs memory reclaim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: Dmitry Osipenko , Liam Girdwood , Mark Brown , Vladimir Zapolskiy Cc: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For systems that have eg. eMMC storage using voltage regulator, memory reclaim path might call back into regulator subsystem. This means we have to make sure no allocations happen with a regulator or regulator list locked. After this series I see no more lockdep complaints on my test system, but please review and test further. First four patches move allocations out of locked regions, next three came as a drive-by cleanups. --- v2: fix bug in patch #4 spotted by kernel test robot reworded commit #7 description Michał Mirosław (7): regulator: push allocation in regulator_init_coupling() outside of lock regulator: push allocation in regulator_ena_gpio_request() out of lock regulator: push allocations in create_regulator() outside of lock regulator: push allocation in set_consumer_device_supply() out of lock regulator: plug of_node leak in regulator_register()'s error path regulator: cleanup regulator_ena_gpio_free() regulator: remove superfluous lock in regulator_resolve_coupling() drivers/regulator/core.c | 164 +++++++++++++++++++++------------------ 1 file changed, 87 insertions(+), 77 deletions(-) -- 2.20.1