Re: [PATCH] nommu: remap_pfn_range: fix addr parameter check

2012-09-17 Thread Scott Jiang
I was using 3.3 linux kernel. I will again check if videobuf2 in 3.5 has already fixed this issue. [snip..] Ok I just checked the vb2_dma_contig allocator and it has no major changes from my version, http://lxr.linux.no/linux+v3.5.3/drivers/media/video/videobuf2-dma-contig.c#L37 So, I

Re: [PATCH] nommu: remap_pfn_range: fix addr parameter check

2012-09-14 Thread Scott Jiang
Yes, the MMU version of remap_pfn_range() does permit non-page-aligned `addr' (at least, if the userspace maaping is a non-COW one). But I suspect that was an implementation accident - it is a nonsensical thing to do, isn't it? The MMU cannot map a bunch of kernel pages onto a

RE: [PATCH] nommu: remap_pfn_range: fix addr parameter check

2012-09-14 Thread Bhupesh SHARMA
@vger.kernel.org; dhowe...@redhat.com; ge...@linux-m68k.org; g...@uclinux.org; sta...@kernel.org; gre...@linuxfoundation.org; Hugh Dickins Subject: Re: [PATCH] nommu: remap_pfn_range: fix addr parameter check Yes, the MMU version of remap_pfn_range() does permit non-page- aligned `addr' (at least

RE: [PATCH] nommu: remap_pfn_range: fix addr parameter check

2012-09-14 Thread Bhupesh SHARMA
...@linux-m68k.org; g...@uclinux.org; sta...@kernel.org; gre...@linuxfoundation.org; Hugh Dickins Subject: RE: [PATCH] nommu: remap_pfn_range: fix addr parameter check -Original Message- From: Scott Jiang [mailto:scott.jiang.li...@gmail.com] Sent: Friday, September 14, 2012 2:53 PM

Re: [PATCH] nommu: remap_pfn_range: fix addr parameter check

2012-09-13 Thread Andrew Morton
On Thu, 13 Sep 2012 10:40:57 +0800 Bob Liu lliu...@gmail.com wrote: The addr parameter may not page aligned eg. when it's come from vfb_mmap():vma-vm_start in video driver. This patch fix the check in remap_pfn_range() else some driver like v4l2 will fail in this function while calling

[PATCH] nommu: remap_pfn_range: fix addr parameter check

2012-09-12 Thread Bob Liu
The addr parameter may not page aligned eg. when it's come from vfb_mmap():vma-vm_start in video driver. This patch fix the check in remap_pfn_range() else some driver like v4l2 will fail in this function while calling mmap() on nommu arch like blackfin and st. Reported-by: Bhupesh SHARMA