From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 26 Oct 2018 10:22:14 +0100 From: Greg KH To: Pavel Machek Cc: Sasha Levin , stable@vger.kernel.org, linux-kernel@vger.kernel.org, Gerald Schaefer , Martin Schwidefsky Subject: Re: [PATCH AUTOSEL 4.14 02/15] s390/hibernate: fix error handling when suspend cpu != resume cpu Message-ID: <20181026092214.GA4307@kroah.com> References: <20181022102026.40869-1-sashal@kernel.org> <20181022102026.40869-2-sashal@kernel.org> <20181026090543.GC20200@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181026090543.GC20200@amd> List-ID: On Fri, Oct 26, 2018 at 11:05:43AM +0200, Pavel Machek wrote: > On Mon 2018-10-22 06:20:13, Sasha Levin wrote: > > From: Gerald Schaefer > > > > [ Upstream commit 55a5542a546238354d1f209f794414168cf8c71d ] > > > > The resume code checks if the resume cpu is the same as the suspend cpu. > > If not, and if it is also not possible to switch to the suspend cpu, an > > error message should be printed and the resume process should be stopped > > by loading a disabled wait psw. > > > > The current logic is broken in multiple ways, the message is never printed, > > and the disabled wait psw never loaded because the kernel panics before that: > > - sam31 and SIGP_SET_ARCHITECTURE to ESA mode is wrong, this will break > > on the first 64bit instruction in sclp_early_printk(). > > - The init stack should be used, but the stack pointer is not set up correctly > > (missing aghi %r15,-STACK_FRAME_OVERHEAD). > > - __sclp_early_printk() checks the sclp_init_state. If it is not > > sclp_init_state_uninitialized, it simply returns w/o printing anything. > > In the resumed kernel however, sclp_init_state will never be uninitialized. > > Stable patches should fix one bug, and one bug only. So should upstream patches, but the rule of "stable patches match upstream identically" overrules this :)