Re: [PATCH 4.4 02/96] s390/runtime instrumention: fix possible memory corruption

Greg Kroah-Hartman
2017-12-06T13:53:49Z

On Wed, Dec 06, 2017 at 02:30:58PM +0100, Heiko Carstens wrote:
> On Wed, Dec 06, 2017 at 08:44:53AM +0100, Greg Kroah-Hartman wrote:
> > On Tue, Dec 05, 2017 at 07:15:34PM +0100, Heiko Carstens wrote:
> > > On Tue, Dec 05, 2017 at 06:08:47PM +0100, Greg Kroah-Hartman wrote:
> > > > On Tue, Dec 05, 2017 at 05:02:32PM +0000, Ben Hutchings wrote:
> > > > > On Tue, 2017-11-28 at 11:22 +0100, Greg Kroah-Hartman wrote:
> > > > > > 4.4-stable review patch.ï¿½ï¿½If anyone has any objections, please let me know.
> > > > > >
> > > > > > ------------------
> > > > > >
> > > > > > From: Heiko Carstens <heiko.carstens@de.ibm.com>
> > > > > >
> > > > > > commit d6e646ad7cfa7034d280459b2b2546288f247144 upstream.
> > > > > [...]
> > > > > > --- a/arch/s390/kernel/runtime_instr.c
> > > > > > +++ b/arch/s390/kernel/runtime_instr.c
> > > > > > @@ -47,11 +47,13 @@ void exit_thread_runtime_instr(void)
> > > > > > ï¿½{
> > > > > > ï¿½ struct task_struct *task = current;
> > > > > > ï¿½
> > > > > > + preempt_disable();
> > > > > > ï¿½ if (!task->thread.ri_cb)
> > > > > > ï¿½ return;
> > > > >
> > > > > This return path now leaves preemption disabled. This seems to have
> > > > > been fixed upstream by commit 8d9047f8b967 "s390/runtime
> > > > > instrumentation: simplify task exit handling".
> > > >
> > > > "simplify" doesn't seem to imply "fixes a bug" :)
> > >
> > > Indeed ;) That where two subsequent patches, but incorrectly split by me...
> > >
> > > > Heiko, should I also queue this patch up?
> > >
> > > Yes, please.
> >
> > It doesn't apply to 4.9-stable or 4.4-stable, can you provide a working
> > backport?
>
> Below is the patch against 4.4-stable:

This and the 4.9 patch now queued up, thanks.

greg k-h