summaryrefslogtreecommitdiffstats
path: root/drivers/sgi
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /drivers/sgi
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
Diffstat (limited to 'drivers/sgi')
-rw-r--r--drivers/sgi/char/graphics.c12
-rw-r--r--drivers/sgi/char/rrm.c3
2 files changed, 9 insertions, 6 deletions
diff --git a/drivers/sgi/char/graphics.c b/drivers/sgi/char/graphics.c
index 62ca3c5e6..46f940243 100644
--- a/drivers/sgi/char/graphics.c
+++ b/drivers/sgi/char/graphics.c
@@ -100,9 +100,10 @@ sgi_graphics_ioctl (struct inode *inode, struct file *file, unsigned int cmd, un
i = verify_area (VERIFY_READ, (void *) arg, sizeof (struct gfx_getboardinfo_args));
if (i) return i;
- __get_user_ret (board, &bia->board, -EFAULT);
- __get_user_ret (dest_buf, &bia->buf, -EFAULT);
- __get_user_ret (max_len, &bia->len, -EFAULT);
+ if (__get_user (board, &bia->board) ||
+ __get_user (dest_buf, &bia->buf) ||
+ __get_user (max_len, &bia->len))
+ return -EFAULT;
if (board >= boards)
return -EINVAL;
@@ -125,8 +126,9 @@ sgi_graphics_ioctl (struct inode *inode, struct file *file, unsigned int cmd, un
i = verify_area (VERIFY_READ, (void *)arg, sizeof (struct gfx_attach_board_args));
if (i) return i;
- __get_user_ret (board, &att->board, -EFAULT);
- __get_user_ret (vaddr, &att->vaddr, -EFAULT);
+ if (__get_user (board, &att->board) ||
+ __get_user (vaddr, &att->vaddr))
+ return -EFAULT;
/* Ok for now we are assuming /dev/graphicsN -> head N even
* if the ioctl api suggests that this is not quite the case.
diff --git a/drivers/sgi/char/rrm.c b/drivers/sgi/char/rrm.c
index 52bc76498..57989c014 100644
--- a/drivers/sgi/char/rrm.c
+++ b/drivers/sgi/char/rrm.c
@@ -60,7 +60,8 @@ rrm_command (unsigned int cmd, void *arg)
i = verify_area (VERIFY_READ, arg, rrm_functions [cmd].arg_size);
if (i) return i;
- __get_user_ret (rnid, (int *) arg, -EFAULT);
+ if (__get_user (rnid, (int *) arg))
+ return -EFAULT;
return (*(rrm_functions [cmd].r_fn))(rnid, arg);
}