From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by kanga.kvack.org (Postfix) with ESMTP id 3F4916B0037 for ; Wed, 14 May 2014 19:01:29 -0400 (EDT) Received: by mail-pa0-f48.google.com with SMTP id rd3so206790pab.35 for ; Wed, 14 May 2014 16:01:28 -0700 (PDT) Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by mx.google.com with ESMTPS id dg5si1648250pbc.480.2014.05.14.16.01.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 16:01:28 -0700 (PDT) Received: by mail-pb0-f44.google.com with SMTP id rq2so215736pbb.3 for ; Wed, 14 May 2014 16:01:28 -0700 (PDT) From: Andy Lutomirski Subject: [PATCH] x86,vdso: Fix an OOPS accessing the hpet mapping w/o an hpet Date: Wed, 14 May 2014 16:01:23 -0700 Message-Id: In-Reply-To: References: Sender: owner-linux-mm@kvack.org List-ID: To: x86@kernel.org, Andrew Morton , Sasha Levin , "linux-mm@kvack.org" , Dave Jones Cc: LKML , Andy Lutomirski The access should fail, but it shouldn't oops. Reported-by: Sasha Levin Signed-off-by: Andy Lutomirski --- This applies to tip/x86/vdso and should be applied to unbreak Trinity on linux-next. arch/x86/vdso/vma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c index e915eae..d02131e 100644 --- a/arch/x86/vdso/vma.c +++ b/arch/x86/vdso/vma.c @@ -84,6 +84,8 @@ static unsigned long vdso_addr(unsigned long start, unsigned len) return addr; } +static struct page *no_pages[] = {NULL}; + static int map_vdso(const struct vdso_image *image, bool calculate_addr) { struct mm_struct *mm = current->mm; @@ -125,7 +127,7 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr) addr + image->size, image->sym_end_mapping - image->size, VM_READ, - NULL); + no_pages); if (IS_ERR(vma)) { ret = PTR_ERR(vma); -- 1.9.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org