From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753879AbbFVXPF (ORCPT ); Mon, 22 Jun 2015 19:15:05 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:56741 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751370AbbFVXO6 (ORCPT ); Mon, 22 Jun 2015 19:14:58 -0400 From: "Rafael J. Wysocki" To: Geert Uytterhoeven Cc: Daniel Lezcano , Thomas Gleixner , Kevin Hilman , Ulf Hansson , Magnus Damm , Laurent Pinchart , linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] PM / Domains: Avoid infinite loops in attach/detach code Date: Tue, 23 Jun 2015 01:41:04 +0200 Message-ID: <5913118.ZpKlm0JFgd@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.1.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1434958282-27376-1-git-send-email-geert+renesas@glider.be> References: <1434622954-26747-3-git-send-email-geert+renesas@glider.be> <1434958282-27376-1-git-send-email-geert+renesas@glider.be> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, June 22, 2015 09:31:22 AM Geert Uytterhoeven wrote: > If pm_genpd_{add,remove}_device() keeps on failing with -EAGAIN, we end > up with an infinite loop in genpd_dev_pm_{at,de}tach(). > > This may happen due to a genpd.prepared_count imbalance. This is a bug > elsewhere, but it will result in a system lock up, possibly during > reboot of an otherwise functioning system. > > To avoid this, put a limit on the maximum number of loop iterations, > including a simple back-off mechanism. If the limit is reached, the > operation will just fail. An error message is already printed. > > Signed-off-by: Geert Uytterhoeven This was too late for my first 4.2 pull request, but I may push it in the second half of the merge window. Does it depend on anything? Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [PATCH 2/2] PM / Domains: Avoid infinite loops in attach/detach code Date: Tue, 23 Jun 2015 01:41:04 +0200 Message-ID: <5913118.ZpKlm0JFgd@vostro.rjw.lan> References: <1434622954-26747-3-git-send-email-geert+renesas@glider.be> <1434958282-27376-1-git-send-email-geert+renesas@glider.be> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7Bit Return-path: Received: from v094114.home.net.pl ([79.96.170.134]:56741 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751370AbbFVXO6 (ORCPT ); Mon, 22 Jun 2015 19:14:58 -0400 In-Reply-To: <1434958282-27376-1-git-send-email-geert+renesas@glider.be> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Geert Uytterhoeven Cc: Daniel Lezcano , Thomas Gleixner , Kevin Hilman , Ulf Hansson , Magnus Damm , Laurent Pinchart , linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org On Monday, June 22, 2015 09:31:22 AM Geert Uytterhoeven wrote: > If pm_genpd_{add,remove}_device() keeps on failing with -EAGAIN, we end > up with an infinite loop in genpd_dev_pm_{at,de}tach(). > > This may happen due to a genpd.prepared_count imbalance. This is a bug > elsewhere, but it will result in a system lock up, possibly during > reboot of an otherwise functioning system. > > To avoid this, put a limit on the maximum number of loop iterations, > including a simple back-off mechanism. If the limit is reached, the > operation will just fail. An error message is already printed. > > Signed-off-by: Geert Uytterhoeven This was too late for my first 4.2 pull request, but I may push it in the second half of the merge window. Does it depend on anything? Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Date: Mon, 22 Jun 2015 23:41:04 +0000 Subject: Re: [PATCH 2/2] PM / Domains: Avoid infinite loops in attach/detach code Message-Id: <5913118.ZpKlm0JFgd@vostro.rjw.lan> List-Id: References: <1434622954-26747-3-git-send-email-geert+renesas@glider.be> In-Reply-To: <1434622954-26747-3-git-send-email-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-sh@vger.kernel.org On Monday, June 22, 2015 09:31:22 AM Geert Uytterhoeven wrote: > If pm_genpd_{add,remove}_device() keeps on failing with -EAGAIN, we end > up with an infinite loop in genpd_dev_pm_{at,de}tach(). > > This may happen due to a genpd.prepared_count imbalance. This is a bug > elsewhere, but it will result in a system lock up, possibly during > reboot of an otherwise functioning system. > > To avoid this, put a limit on the maximum number of loop iterations, > including a simple back-off mechanism. If the limit is reached, the > operation will just fail. An error message is already printed. > > Signed-off-by: Geert Uytterhoeven This was too late for my first 4.2 pull request, but I may push it in the second half of the merge window. Does it depend on anything? Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in