From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964847AbVKLWWe (ORCPT ); Sat, 12 Nov 2005 17:22:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964849AbVKLWWe (ORCPT ); Sat, 12 Nov 2005 17:22:34 -0500 Received: from petaflop.b.gz.ru ([217.67.124.5]:15531 "EHLO hq.sectorb.msk.ru") by vger.kernel.org with ESMTP id S964847AbVKLWWd (ORCPT ); Sat, 12 Nov 2005 17:22:33 -0500 Subject: Re: [x86_64] 2.6.14-git13 mplayer fails with "v4l2: ioctl queue buffer failed: Bad address" (2 Nov 2005, 11 Nov 2005) From: "Nickolay V. Shmyrev" To: Linux and Kernel Video Cc: Junichi Uekawa , Nick Piggin , Michael Krufky , linux-kernel@vger.kernel.org, debian-amd64@lists.debian.org In-Reply-To: References: <87fyqeicge.dancerj%dancer@netfort.gr.jp> <87wtjg5gh2.dancerj%dancer@netfort.gr.jp> <4373D087.5050908@linuxtv.org> <87psp859sd.dancerj%dancer@netfort.gr.jp> <43740F06.6030504@m1k.net> <87y83vl780.dancerj%dancer@netfort.gr.jp> <87ek5nb9ec.dancerj%dancer@netfort.gr.jp> Content-Type: text/plain Date: Sun, 13 Nov 2005 01:22:51 +0300 Message-Id: <1131834172.8368.6.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hello all. We have even found the hack that fix that problem: Index: linux/drivers/media/video/video-buf.c =================================================================== RCS file: /cvs/video4linux/v4l-kernel/linux/drivers/media/video/video-buf.c,v retrieving revision 1.21 diff -u -p -r1.21 video-buf.c --- linux/drivers/media/video/video-buf.c 16 Oct 2005 12:13:58 -0000 +++ linux/drivers/media/video/video-buf.c 12 Nov 2005 22:19:13 -0000 @@ -1248,7 +1248,7 @@ int videobuf_mmap_mapper(struct videobuf map->end = vma->vm_end; map->q = q; vma->vm_ops = &videobuf_vm_ops; - vma->vm_flags |= VM_DONTEXPAND | VM_RESERVED; + vma->vm_flags |= VM_DONTEXPAND; vma->vm_flags &= ~VM_IO; /* using shared anonymous pages */ vma->vm_private_data = map; dprintk(1,"mmap %p: q=%p %08lx-%08lx pgoff %08lx bufs %d-%d\n", Somehow since 2.6.15-rc1 VM_RESERVED makes get_user_pages return EFAULT. I don't know the exact reason of that behavior and the correct way to fix that problem. Just kernel interfaces changed once again, the old point everyone knows. So if someone can explain it, that would be helpful.