Re: [PATCH] omap_vout: find_vma() needs ->mmap_sem held

2013-01-07 Thread Laurent Pinchart
On Sunday 16 December 2012 20:04:46 Al Viro wrote: > On Sun, Dec 16, 2012 at 09:01:10PM +0100, Paul Bolle wrote: > > > + vma = find_vma(mm, virtp); > > > > > > } else if (vma && (vma->vm_flags & VM_IO) && vma->vm_pgoff) { > > > > Shouldn't that line become > > > > if (vma &&

Re: [PATCH] omap_vout: find_vma() needs ->mmap_sem held

2013-01-07 Thread Laurent Pinchart
rently missing an active maintainer, as it is for an old > hardware (AFAIK, omap is now at version 4, and this is for the first one), > but I'm c/c a few developers that might help to test and analyze it. > > In any case, /me is assuming that your patch is right (as nobody > complained

Re: [PATCH] omap_vout: find_vma() needs ->mmap_sem held

2013-01-07 Thread Laurent Pinchart
Hi Mauro, On Sunday 06 January 2013 11:02:25 Mauro Carvalho Chehab wrote: > Em Sat, 15 Dec 2012 20:38:29 + Al Viro escreveu: > > On Sat, Dec 15, 2012 at 08:12:37PM +, Al Viro wrote: > > > Walking rbtree while it's modified is a Bad Idea(tm); besides, > > > > > > the result of

Re: [PATCH] omap_vout: find_vma() needs -mmap_sem held

2013-01-07 Thread Laurent Pinchart
Hi Mauro, On Sunday 06 January 2013 11:02:25 Mauro Carvalho Chehab wrote: Em Sat, 15 Dec 2012 20:38:29 + Al Viro escreveu: On Sat, Dec 15, 2012 at 08:12:37PM +, Al Viro wrote: Walking rbtree while it's modified is a Bad Idea(tm); besides, the result of find_vma() can be

Re: [PATCH] omap_vout: find_vma() needs -mmap_sem held

2013-01-07 Thread Laurent Pinchart
it. In any case, /me is assuming that your patch is right (as nobody complained), and I'm applying it right now on my tree. This will hopefully allow some people to test. Please make sure you apply v2 (posted as Re: [PATCH] omap_vout: find_vma() needs -mmap_sem held). -- Regards, Laurent Pinchart

Re: [PATCH] omap_vout: find_vma() needs -mmap_sem held

2013-01-07 Thread Laurent Pinchart
On Sunday 16 December 2012 20:04:46 Al Viro wrote: On Sun, Dec 16, 2012 at 09:01:10PM +0100, Paul Bolle wrote: + vma = find_vma(mm, virtp); } else if (vma (vma-vm_flags VM_IO) vma-vm_pgoff) { Shouldn't that line become if (vma (vma-vm_flags VM_IO) vma-vm_pgoff) {

Re: [PATCH] omap_vout: find_vma() needs ->mmap_sem held

2013-01-06 Thread Mauro Carvalho Chehab
Hi Viro, Em Sat, 15 Dec 2012 20:38:29 + Al Viro escreveu: > On Sat, Dec 15, 2012 at 08:12:37PM +, Al Viro wrote: > > Walking rbtree while it's modified is a Bad Idea(tm); besides, > > the result of find_vma() can be freed just as it's getting returned > > to caller. Fortunately,

Re: [PATCH] omap_vout: find_vma() needs -mmap_sem held

2013-01-06 Thread Mauro Carvalho Chehab
Hi Viro, Em Sat, 15 Dec 2012 20:38:29 + Al Viro v...@zeniv.linux.org.uk escreveu: On Sat, Dec 15, 2012 at 08:12:37PM +, Al Viro wrote: Walking rbtree while it's modified is a Bad Idea(tm); besides, the result of find_vma() can be freed just as it's getting returned to caller.

Re: [PATCH] omap_vout: find_vma() needs ->mmap_sem held

2012-12-16 Thread Al Viro
On Sun, Dec 16, 2012 at 09:01:10PM +0100, Paul Bolle wrote: > > + vma = find_vma(mm, virtp); > > } else if (vma && (vma->vm_flags & VM_IO) && vma->vm_pgoff) { > > Shouldn't that line become > if (vma && (vma->vm_flags & VM_IO) && vma->vm_pgoff) { > > so that this actually compiles?

Re: [PATCH] omap_vout: find_vma() needs ->mmap_sem held

2012-12-16 Thread Paul Bolle
On Sat, 2012-12-15 at 20:12 +, Al Viro wrote: > Walking rbtree while it's modified is a Bad Idea(tm); besides, > the result of find_vma() can be freed just as it's getting returned > to caller. Fortunately, it's easy to fix - just take ->mmap_sem a bit > earlier (and don't bother with

Re: [PATCH] omap_vout: find_vma() needs -mmap_sem held

2012-12-16 Thread Paul Bolle
On Sat, 2012-12-15 at 20:12 +, Al Viro wrote: Walking rbtree while it's modified is a Bad Idea(tm); besides, the result of find_vma() can be freed just as it's getting returned to caller. Fortunately, it's easy to fix - just take -mmap_sem a bit earlier (and don't bother with

Re: [PATCH] omap_vout: find_vma() needs -mmap_sem held

2012-12-16 Thread Al Viro
On Sun, Dec 16, 2012 at 09:01:10PM +0100, Paul Bolle wrote: + vma = find_vma(mm, virtp); } else if (vma (vma-vm_flags VM_IO) vma-vm_pgoff) { Shouldn't that line become if (vma (vma-vm_flags VM_IO) vma-vm_pgoff) { so that this actually compiles? *Do'h* Yes, it should.

Re: [PATCH] omap_vout: find_vma() needs ->mmap_sem held

2012-12-15 Thread Al Viro
On Sat, Dec 15, 2012 at 08:12:37PM +, Al Viro wrote: > Walking rbtree while it's modified is a Bad Idea(tm); besides, > the result of find_vma() can be freed just as it's getting returned > to caller. Fortunately, it's easy to fix - just take ->mmap_sem a bit > earlier (and don't bother

[PATCH] omap_vout: find_vma() needs ->mmap_sem held

2012-12-15 Thread Al Viro
Walking rbtree while it's modified is a Bad Idea(tm); besides, the result of find_vma() can be freed just as it's getting returned to caller. Fortunately, it's easy to fix - just take ->mmap_sem a bit earlier (and don't bother with find_vma() at all if virtp >= PAGE_OFFSET - in that case

[PATCH] omap_vout: find_vma() needs -mmap_sem held

2012-12-15 Thread Al Viro
Walking rbtree while it's modified is a Bad Idea(tm); besides, the result of find_vma() can be freed just as it's getting returned to caller. Fortunately, it's easy to fix - just take -mmap_sem a bit earlier (and don't bother with find_vma() at all if virtp = PAGE_OFFSET - in that case we

Re: [PATCH] omap_vout: find_vma() needs -mmap_sem held

2012-12-15 Thread Al Viro
On Sat, Dec 15, 2012 at 08:12:37PM +, Al Viro wrote: Walking rbtree while it's modified is a Bad Idea(tm); besides, the result of find_vma() can be freed just as it's getting returned to caller. Fortunately, it's easy to fix - just take -mmap_sem a bit earlier (and don't bother with