mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
[VIDEO] sbuslib: Disallow private mmaps.
The COW semantics just do not make any sense especially with the physically discontiguous I/O mappings possible here. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
597d1f0622
commit
e445ee65cb
1 changed files with 3 additions and 0 deletions
|
@ -46,6 +46,9 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map,
|
||||||
unsigned long off;
|
unsigned long off;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!(vma->vm_flags & (VM_SHARED | VM_MAYSHARE)))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
size = vma->vm_end - vma->vm_start;
|
size = vma->vm_end - vma->vm_start;
|
||||||
if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))
|
if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in a new issue