Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755987AbbDIQtd (ORCPT ); Thu, 9 Apr 2015 12:49:33 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:52072 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755251AbbDIQta convert rfc822-to-8bit (ORCPT ); Thu, 9 Apr 2015 12:49:30 -0400 From: "Rafael J. Wysocki" To: Pali =?ISO-8859-1?Q?Roh=E1r?= Cc: Alasdair Kergon , Mike Snitzer , Neil Brown , Len Brown , Pavel Machek , dm-devel@redhat.com, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 1/3] PM suspend/hibernate: Call notifier after freezing processes Date: Thu, 09 Apr 2015 19:13:55 +0200 Message-ID: <1856560.gNHsvxOS0D@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.19.0+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <201504090836.57365@pali> References: <1428254419-7334-1-git-send-email-pali.rohar@gmail.com> <1530775.n2Kjx1bffW@vostro.rjw.lan> <201504090836.57365@pali> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1625 Lines: 42 On Thursday, April 09, 2015 08:36:57 AM Pali Rohár wrote: > > --nextPart2566388.gOmNIJrIqI > Content-Type: Text/Plain; > charset="utf-8" > Content-Transfer-Encoding: quoted-printable > > On Thursday 09 April 2015 02:28:41 Rafael J. Wysocki wrote: > > On Sunday, April 05, 2015 07:20:17 PM Pali Roh=C3=A1r wrote: > > > To prevent race conditions on userspace processes with I/O > > > some taks must be called after processes are freezed. This > > > patch adds new events which are delivered by > > > pm_notifier_call_chain() after freezing processes when > > > doing suspend or hibernate action. > > >=20 > > > Signed-off-by: Pali Roh=C3=A1r > >=20 > > Please don't add more notifiers. Just call whatever you need > > directly from where you need to call that. > >=20 > > If that is device-related, try to use device PM > > suspend/hibernate callbacks instead. > >=20 > > Hi! It is not possible to use any exiting pm notifiers! This is=20 > reason why I added new ones. As I wrote wiping dm crypt keys must=20 > be done *after* userspace processes are freezed to prevent race=20 > conditions... I'm not talking about using the existing notifiers. I'm talking about calling the function you need to call directly from a suitable place in the system suspend code. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/