From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 7 Dec 2012 15:49:22 +0100 From: Oleg Nesterov To: Joseph Salisbury , Greg Kroah-Hartman Cc: Ben Hutchings , "Rafael J. Wysocki" , Herton Krzesinski , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH -stable 1/1] freezer: PF_FREEZER_NOSIG should be cleared along with PF_NOFREEZE Message-ID: <20121207144922.GB6478@redhat.com> References: <50BF9CC2.7070705@canonical.com> <1354762294.17107.157.camel@deadeye.wl.decadent.org.uk> <20121206124201.GA30705@redhat.com> <50C10391.4040903@canonical.com> <20121207144901.GA6478@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121207144901.GA6478@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: This patch is only for pre-v3.3 stable trees which backported b40a7959 "freezer: exec should clear PF_NOFREEZE along with PF_KTHREAD". v3.3+ doesn't need this fix. b40a7959 is the trivial bugfix, but unfortunately I forgot that until 34b087e4 "freezer: kill unused set_freezable_with_signal()" there were another only-for-kernel-threads flag, PF_FREEZER_NOSIG, which should be cleared as well. See https://bugs.launchpad.net/ubuntu/+source/v86d/+bug/1080530 The freezer fails because it expects that a PF_FREEZER_NOSIG task doesn't need a signal. Before b40a7959 it wrongly succeeds leaving the PF_NOFREEZE | PF_FREEZER_NOSIG task unfrozen. Reported-and-tested-by: Joseph Salisbury Cc: stable@vger.kernel.org # pre v3.3 if commit b40a7959 was taken Signed-off-by: Oleg Nesterov --- a/fs/exec.c +++ b/fs/exec.c @@ -1084,7 +1084,7 @@ int flush_old_exec(struct linux_binprm * set_fs(USER_DS); current->flags &= - ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE); + ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE | PF_FREEZER_NOSIG); flush_thread(); current->personality &= ~bprm->per_clear;