Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2730623ybi; Sun, 9 Jun 2019 19:36:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFPcYKcv093zb04B3zovv4vBgzww6vtfHpguHt3vp797CHAa9VVFIZuHbxDCvhYEmxHlpT X-Received: by 2002:a63:4d0e:: with SMTP id a14mr12711059pgb.346.1560134163143; Sun, 09 Jun 2019 19:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560134163; cv=none; d=google.com; s=arc-20160816; b=wqs8wxHDWKdZjCTWbBxrIOaHvBtVYBMFpCe1rPY2fsDdcNQVH+6onPkRWiuhcPPXHP pv9Nmv5HVEQELv2TYDsRi52ke5YtRd1SAdimv6zS+J15siuqpiD0222EsihGLyDwK+dK cr13h0dowc+UKjcwserblNGS15b38CP39XG/FPAi0xr8z7+cwxUaTkV7OIRm9XqQA8Cu T9ju40WMawv8s2AOae8UtlZyaFvtlRUboUdygx4d9EQGn1qmst+0h0ni+VFstD7G68w9 DryrOf8N8nT4A7MjaS8fFumBijoZHjgg6P2y+2f0u6yFTKv+ZMOqWbb/mA9+tmEaTCgd de+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=afKgTHmsyagHLmYfWGsSLRAHwZWSCleIZNkXxK90uPY=; b=qQgmw6xBf5v1RGFsf8frmtrO4yeln07mXRelegZ1xzluruGPZc9NTIcGkzKRZbr4ny soa0ksAXDC5criKRUWwMYFlZcrZKoL9+ZQEDNiemPdHil82DNA+VGYmU3tkeuJHHyItu +Ks8M2QI/YqVeTwr9Ms5KeraEPGhYOdbDlZXGYr8Qapi3GPbHqifox4jaOyQPf6ELddo tzGKeW80/VmRSP6ysGfzR5PJjHpgdYMVEaBTixu3xRE2hA7JoPt2cboifLVuyCjgoYZd YqzVl0T4uu2gAXCWFJtX2cvWxPcYxSIbeIy+Z71zn7gas4zeiwEbWx/arNTATy2ySmj0 fZ+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fawIqtj7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id q195si8586303pgq.119.2019.06.09.19.35.44; Sun, 09 Jun 2019 19:36:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fawIqtj7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730334AbfFJCeE (ORCPT + 99 others); Sun, 9 Jun 2019 22:34:04 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:46220 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730278AbfFJCeE (ORCPT ); Sun, 9 Jun 2019 22:34:04 -0400 Received: by mail-ed1-f66.google.com with SMTP id h10so12124744edi.13 for ; Sun, 09 Jun 2019 19:34:03 -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; bh=afKgTHmsyagHLmYfWGsSLRAHwZWSCleIZNkXxK90uPY=; b=fawIqtj7htmk9JLOUC28S3iKNbxX4HMtjGN+MuVQUAVuCjMhYUz6VWwQ727OC2TTt4 W5z42Nj1T8lmxR/j7JX2G/xkWIznAEh54U6SciR/Py1AiQQ97VIHcIfNhg7M+zqeL7gK izRcmPWT4FC06S8MN1aWWe825DOKTmxJM7433UVz2/MiCaj8Sz4LpRPzK7PDdPsyVETN QR4AJ6dqdo+Lu1gSRb3uPqLcByPZNMcPQHqBtKIumdmVs7248ruDEZxzggK8rE72NPxk oCxocsJ0+FYyrkeVnrDf1c2D/DC+TFx/SVnL9hSuiS3a/m0iWaGSv3k+BBZlFXVajXAB JwBw== 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; bh=afKgTHmsyagHLmYfWGsSLRAHwZWSCleIZNkXxK90uPY=; b=dmia+S/jMn+xZqT2D2ylUbLZooAjZqBa7ybPOMKVNsu2xQYALfshN2aHZqRevx+i1C TQt67e+WulgciQc9j5S5Np2tLcmtj7QXVYdzAlm6CA/mFtjovuJVrfLmDUPJHvviWGp/ ABEuRmp/wMWab9pEWY8GjrMShjDZ3rkDYbWRLJAlIWoBa61SQqITk4TBIbf3yU7msrYj 2nWJ3itbwmPYXYD8iILrEoGwfs3vo+4L5jI+/RIbg3Zlb7yel5Y1uq0RyL1h/jLOWT/V 4quFB72HLhJqHEkJ9VOCbrJTJkGNaH44W/TYz7R2nNxOIw+Zv4e7pdWuQqp+vq2Rpdw/ 69sw== X-Gm-Message-State: APjAAAWfssKVxwfXCPqAIV1S67OJ8m8IySlF/eYdqyWq3FdMLdKNyuk6 294YXDyxXhZlSJqeQyIofHFkeqdp0nTiP+z46wFNXQ== X-Received: by 2002:a50:ec1a:: with SMTP id g26mr71250547edr.174.1560134042811; Sun, 09 Jun 2019 19:34:02 -0700 (PDT) MIME-Version: 1.0 References: <20190605111412.3461-1-zhang.chunyan@linaro.org> <20190606010857.GF29739@sasha-vm> In-Reply-To: <20190606010857.GF29739@sasha-vm> From: Chunyan Zhang Date: Mon, 10 Jun 2019 10:33:51 +0800 Message-ID: Subject: Re: [BACKPORT 4.4.y] PM / sleep: prohibit devices probing during suspend/hibernation To: Sasha Levin Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linux Kernel Mailing List , Grygorii Strashko , "Rafael J . Wysocki" , Chunyan Zhang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 6 Jun 2019 at 09:08, Sasha Levin wrote: > > On Wed, Jun 05, 2019 at 07:14:12PM +0800, Chunyan Zhang wrote: > >From: "Strashko, Grygorii" > > > >[ Upstream commit 013c074f8642d8e815ad670601f8e27155a74b57 ] > > > >It is unsafe [1] if probing of devices will happen during suspend or > >hibernation and system behavior will be unpredictable in this case. > >So, let's prohibit device's probing in dpm_prepare() and defer their > >probing instead. The normal behavior will be restored in > >dpm_complete(). > > > >This patch introduces new DD core APIs: > > device_block_probing() > > It will disable probing of devices and defer their probes instead. > > device_unblock_probing() > > It will restore normal behavior and trigger re-probing of deferred > > devices. > > > >[1] https://lkml.org/lkml/2015/9/11/554 > > > >Signed-off-by: Grygorii Strashko > >Acked-by: Pavel Machek > >Signed-off-by: Rafael J. Wysocki > >Signed-off-by: Chunyan Zhang > > This patch had to be fixed a few times (see 015bb5e134 and 9a2a5a638f8), > we can't just take it as is. > > It might be just simpler to move to a newer kernel at this point. Thanks for the information and suggestion! Chunyan > > -- > Thanks, > Sasha