Re: [x86_64] 2.6.14-git13 mplayer fails with "v4l2: ioctl queue buffer failed: Bad address" (2 Nov 2005, 11 Nov 2005)

From: Matti Aarnio (matti.aarnio_at_zmailer.org)
Date: 11/13/05

  • Next message: Andi Kleen: "Re: [PATCH 17/18] unbindable mounts"
    Date:	Sun, 13 Nov 2005 04:54:17 +0200
    To: "Nickolay V. Shmyrev" <nshmyrev@yandex.ru>
    
    

    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
    -
    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/


  • Next message: Andi Kleen: "Re: [PATCH 17/18] unbindable mounts"

    Relevant Pages

    • Re: Remote Assistance through different listening port
      ... There's no hack to fix this. ... to use a UPnP capable router, and have the relevant services turned on on ... editing the ticket is one way to work around the issue. ...
      (microsoft.public.windowsxp.work_remotely)
    • Re: loading 2005
      ... Fix it the right way if you would have called your VAR you would have ... This comes up when I try to used hole wizard. ... These are not on the computer anymore. ... You can 'hack' the SWBrowser.mdb file if you want. ...
      (comp.cad.solidworks)
    • Re: Ingo, no more kconfig patches
      ... mach-rdc321x Kconfig fix). ... Preliminary quick hack below. ... There had been need of rain for many days. ...
      (Linux-Kernel)
    • Programs for Open With
      ... for the file type. ... Can I hack the registry to fix this? ...
      (microsoft.public.win2000.applications)
    • [PATCH] ppc64: fix linkage error on G5
      ... It turns out we are trying to fix this problem twice, ... With this fixed we can remove the #define hack. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)