Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964798AbVKQTah (ORCPT ); Thu, 17 Nov 2005 14:30:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964797AbVKQTah (ORCPT ); Thu, 17 Nov 2005 14:30:37 -0500 Received: from gold.veritas.com ([143.127.12.110]:18231 "EHLO gold.veritas.com") by vger.kernel.org with ESMTP id S964798AbVKQTag (ORCPT ); Thu, 17 Nov 2005 14:30:36 -0500 Date: Thu, 17 Nov 2005 19:29:17 +0000 (GMT) From: Hugh Dickins X-X-Sender: hugh@goblin.wat.veritas.com To: Andrew Morton cc: Nick Piggin , linux-kernel@vger.kernel.org Subject: [PATCH 01/11] unpaged: get_user_pages VM_RESERVED In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 17 Nov 2005 19:30:35.0133 (UTC) FILETIME=[61B94AD0:01C5EBAD] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1287 Lines: 33 The PageReserved removal in 2.6.15-rc1 prohibited get_user_pages on the areas flagged VM_RESERVED in place of PageReserved. That is correct in theory - we ought not to interfere with struct pages in such a reserved area; but in practice it broke BTTV for one. So revert to prohibiting only on VM_IO: if someone gets into trouble with get_user_pages on VM_RESERVED, it'll just be a "don't do that". You can argue that videobuf_mmap_mapper shouldn't set VM_RESERVED in the first place, but now's not the time for breaking drivers without notice. Signed-off-by: Hugh Dickins --- mm/memory.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) --- 2.6.15-rc1-git5/mm/memory.c 2005-11-17 13:53:21.000000000 +0000 +++ unpaged01/mm/memory.c 2005-11-17 15:10:08.000000000 +0000 @@ -968,7 +968,7 @@ int get_user_pages(struct task_struct *t continue; } - if (!vma || (vma->vm_flags & (VM_IO | VM_RESERVED)) + if (!vma || (vma->vm_flags & VM_IO) || !(vm_flags & vma->vm_flags)) return i ? : -EFAULT; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/