OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
597d1f0
)
[VIDEO] sbuslib: Disallow private mmaps.
author
David S. Miller
<davem@sunset.davemloft.net>
Sat, 24 Dec 2005 20:06:10 +0000
(12:06 -0800)
committer
David S. Miller
<davem@sunset.davemloft.net>
Sat, 24 Dec 2005 20:06:10 +0000
(12:06 -0800)
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>
drivers/video/sbuslib.c
patch
|
blob
|
history
diff --git
a/drivers/video/sbuslib.c
b/drivers/video/sbuslib.c
index
646c43f
..
3a74a63
100644
(file)
--- 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;