summaryrefslogtreecommitdiff
path: root/linux/i810_dma.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2003-02-21 07:16:52 +0000
committerEric Anholt <anholt@freebsd.org>2003-02-21 07:16:52 +0000
commit734270fb379417d5c13550423556999ee93b4b4f (patch)
tree29424ae56072f69c52cf44ddb06045c76b36191e /linux/i810_dma.c
parentae0ee9a2f7f84196a616026a5974c8196dc7ab97 (diff)
Merge from trunk to bsd-4-0-0-branch.bsd-4-0-0-20030220bsd-4-0-0-branch
Diffstat (limited to 'linux/i810_dma.c')
-rw-r--r--linux/i810_dma.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/linux/i810_dma.c b/linux/i810_dma.c
index 13f5f64f..004a7eb6 100644
--- a/linux/i810_dma.c
+++ b/linux/i810_dma.c
@@ -38,6 +38,13 @@
#include "i810_drv.h"
#include <linux/interrupt.h> /* For task queue support */
#include <linux/delay.h>
+#include <linux/pagemap.h>
+
+#ifdef DO_MUNMAP_4_ARGS
+#define DO_MUNMAP(m, a, l) do_munmap(m, a, l, 1)
+#else
+#define DO_MUNMAP(m, a, l) do_munmap(m, a, l)
+#endif
#ifdef DO_MUNMAP_4_ARGS
#define DO_MUNMAP(m, a, l) do_munmap(m, a, l, 1)
@@ -1184,7 +1191,8 @@ int i810_ov0_info(struct inode *inode, struct file *filp,
data.offset = dev_priv->overlay_offset;
data.physical = dev_priv->overlay_physical;
- copy_to_user((drm_i810_overlay_t *)arg,&data,sizeof(data));
+ if (copy_to_user((drm_i810_overlay_t *)arg,&data,sizeof(data)))
+ return -EFAULT;
return 0;
}