Return-Path: Received: from mail.kernel.org ([198.145.29.99]:52278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726683AbeK2Xiz (ORCPT ); Thu, 29 Nov 2018 18:38:55 -0500 Date: Thu, 29 Nov 2018 13:33:40 +0100 From: Greg KH To: Janosch Frank Cc: stable@vger.kernel.org, borntraeger@de.ibm.com Subject: Re: [PATCH 4.9+] s390/mm: Check for valid vma before zapping in gmap_discard Message-ID: <20181129123340.GH3149@kroah.com> References: <1541666461-19279-1-git-send-email-frankja@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1541666461-19279-1-git-send-email-frankja@linux.ibm.com> Sender: stable-owner@vger.kernel.org List-ID: On Thu, Nov 08, 2018 at 09:41:00AM +0100, Janosch Frank wrote: > From: Janosch Frank > > Userspace could have munmapped the area before doing unmapping from the > gmap. This would leave us with a valid vmaddr, but an invalid vma from > which we would try to zap memory. > > Let's check before using the vma. > > Fixes: 1e133ab296f3 ("s390/mm: split arch/s390/mm/pgtable.c") > Signed-off-by: Janosch Frank > Reviewed-by: David Hildenbrand > Reported-by: Dan Carpenter > CC: stable@vger.kernel.org # 4.6+ > --- > arch/s390/mm/gmap.c | 2 ++ > 1 file changed, 2 insertions(+) Please always include the upstream git commit id so that I have a clue as to what it is when doing the backport. thanks, greg k-h