patch-2.3.99-pre2 linux/drivers/block/lvm.c
Next file: linux/drivers/block/nbd.c
Previous file: linux/drivers/block/ll_rw_blk.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Wed Mar 15 00:37:49 2000
- Orig file:
v2.3.99-pre1/linux/drivers/block/lvm.c
- Orig date:
Sat Feb 26 22:31:44 2000
diff -u --recursive --new-file v2.3.99-pre1/linux/drivers/block/lvm.c linux/drivers/block/lvm.c
@@ -892,8 +892,8 @@
"%s -- lvm_blk_ioctl -- BLKGETSIZE: %u\n",
lvm_name, lv_ptr->lv_size);
#endif
- copy_to_user((long *) arg, &lv_ptr->lv_size,
- sizeof(lv_ptr->lv_size));
+ if (put_user(lv_ptr->lv_size, (long *)arg))
+ return -EFAULT;
break;
@@ -931,8 +931,8 @@
printk(KERN_DEBUG
"%s -- lvm_blk_ioctl -- BLKRAGET\n", lvm_name);
#endif
- copy_to_user((long *) arg, &lv_ptr->lv_read_ahead,
- sizeof(lv_ptr->lv_read_ahead));
+ if (put_user(lv->lv_read_ahead, (long *)arg))
+ return -EFAULT;
break;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)