From: Matti Aarnio <matti.aarnio@zmailer.org>
To: "Nickolay V. Shmyrev" <nshmyrev@yandex.ru>
Cc: Linux and Kernel Video <video4linux-list@redhat.com>,
Junichi Uekawa <dancer@netfort.gr.jp>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Michael Krufky <mkrufky@m1k.net>,
linux-kernel@vger.kernel.org, debian-amd64@lists.debian.org
Subject: Re: [x86_64] 2.6.14-git13 mplayer fails with "v4l2: ioctl queue buffer failed: Bad address" (2 Nov 2005, 11 Nov 2005)
Date: Sun, 13 Nov 2005 04:54:17 +0200 [thread overview]
Message-ID: <20051113025417.GN5706@mea-ext.zmailer.org> (raw)
In-Reply-To: <1131834172.8368.6.camel@localhost.localdomain>
On Sun, Nov 13, 2005 at 01:22:51AM +0300, Nickolay V. Shmyrev wrote:
> Hello all.
>
> We have even found the hack that fix that problem:
A hack, but working one..
(for the small while that I tested it)
> 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.
This EFAULT rejection is due to change in get_user_pages() function
in mm/memory.c file of 2.6.14-git2
@@ -945,8 +947,8 @@ int get_user_pages(struct task_struct *t
continue;
}
- if (!vma || (vma->vm_flags & VM_IO)
- || !(flags & vma->vm_flags))
+ if (!vma || (vma->vm_flags & (VM_IO | VM_RESERVED))
+ || !(vm_flags & vma->vm_flags))
return i ? : -EFAULT;
if (is_vm_hugetlb_page(vma)) {
I don't know how to use git tools to see, whose patch actually
did this particular change.
/Matti Aarnio
next prev parent reply other threads:[~2005-11-13 2:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-03 4:26 mencoder fails with Linux kernel from linus's git tree (2 " Junichi Uekawa
2005-11-10 21:40 ` [x86_64] 2.6.14-git13 mplayer fails with "v4l2: ioctl queue buffer failed: Bad address" (2 Nov 2005, 11 " Junichi Uekawa
2005-11-10 22:58 ` Mike Krufky
2005-11-11 0:05 ` Junichi Uekawa
2005-11-11 3:24 ` Michael Krufky
2005-11-11 12:06 ` Junichi Uekawa
2005-11-11 13:11 ` Michael Krufky
2005-11-11 13:29 ` Junichi Uekawa
2005-11-11 14:06 ` Hugh Dickins
2005-11-12 22:22 ` Nickolay V. Shmyrev
2005-11-13 2:54 ` Matti Aarnio [this message]
2005-11-13 4:24 ` Junichi Uekawa
2005-11-16 12:50 ` Nickolay V. Shmyrev
2005-11-16 17:47 ` Hugh Dickins
2005-12-01 0:09 ` Junichi Uekawa
2005-11-17 0:07 ` Junichi Uekawa
2005-11-11 14:21 ` Junichi Uekawa
2005-11-12 21:11 ` Ricardo Cerqueira
[not found] ` <87mzj4uoys.dancerj%dancer@netfort.gr.jp>
2005-12-19 23:10 ` [x86_64] linux 2.6.15-rc6 mplayer fails to record ALSA audio Junichi Uekawa
2006-01-14 7:33 ` Junichi Uekawa
2006-01-19 23:11 ` [x86_64] bttv: linux 2.6.16-rc1 mplayer fails to record ALSA audio and fails tune TV Junichi Uekawa
2006-02-02 9:13 ` Junichi Uekawa
2006-02-02 13:53 ` Manu Abraham
2006-02-02 23:04 ` Junichi Uekawa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051113025417.GN5706@mea-ext.zmailer.org \
--to=matti.aarnio@zmailer.org \
--cc=dancer@netfort.gr.jp \
--cc=debian-amd64@lists.debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkrufky@m1k.net \
--cc=nickpiggin@yahoo.com.au \
--cc=nshmyrev@yandex.ru \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®