git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[PATCH] powerpc: Allow for ppc_md restart, power_off, and halt to be NULL
[safe/jmp/linux-2.6]
/
drivers
/
video
/
sbuslib.c
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;