diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2005-12-24 12:06:10 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-12-24 12:06:10 -0800 |
commit | e445ee65cbefaa19131c972ae7fe221c95cf4cc4 (patch) | |
tree | 2f7e4639069e3a1c5a5457d6fc879f02f0e9977c /drivers | |
parent | 597d1f0622d21ffe54aceef8da9682e776f51cc2 (diff) | |
download | op-kernel-dev-e445ee65cbefaa19131c972ae7fe221c95cf4cc4.zip op-kernel-dev-e445ee65cbefaa19131c972ae7fe221c95cf4cc4.tar.gz |
[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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/sbuslib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 646c43f..3a74a63d 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c @@ -46,6 +46,9 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map, unsigned long off; int i; + if (!(vma->vm_flags & (VM_SHARED | VM_MAYSHARE))) + return -EINVAL; + size = vma->vm_end - vma->vm_start; if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) return -EINVAL; |