From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753310AbaENXBd (ORCPT ); Wed, 14 May 2014 19:01:33 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:34723 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751324AbaENXB2 (ORCPT ); Wed, 14 May 2014 19:01:28 -0400 From: Andy Lutomirski To: x86@kernel.org, Andrew Morton , Sasha Levin , "linux-mm@kvack.org" , Dave Jones Cc: LKML , 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: X-Mailer: git-send-email 1.9.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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