ia64/xen-unstable

changeset 1048:92b00b4495fa

bitkeeper revision 1.687 (40103b9b_1gDIgjZpv4iQ_7yaCD9YQ)

xl_block.c:
Fix user data handling in cdrom ioctl.
author kaf24@scramble.cl.cam.ac.uk
date Thu Jan 22 21:07:39 2004 +0000 (2004-01-22)
parents 4ec435d7c966
children e38f01055fc3
files xenolinux-2.4.24-sparse/arch/xeno/drivers/block/xl_block.c
line diff
     1.1 --- a/xenolinux-2.4.24-sparse/arch/xeno/drivers/block/xl_block.c	Thu Jan 22 01:40:31 2004 +0000
     1.2 +++ b/xenolinux-2.4.24-sparse/arch/xeno/drivers/block/xl_block.c	Thu Jan 22 21:07:39 2004 +0000
     1.3 @@ -147,6 +147,7 @@ int xenolinux_block_ioctl(struct inode *
     1.4      struct hd_geometry *geo = (struct hd_geometry *)argument;
     1.5      struct gendisk *gd;     
     1.6      struct hd_struct *part; 
     1.7 +    int i;
     1.8  
     1.9      /* NB. No need to check permissions. That is done for us. */
    1.10      
    1.11 @@ -207,8 +208,8 @@ int xenolinux_block_ioctl(struct inode *
    1.12  
    1.13      case CDROMMULTISESSION:
    1.14          DPRINTK("FIXME: support multisession CDs later\n");
    1.15 -        memset((struct cdrom_multisession *)argument, 0, 
    1.16 -               sizeof(struct cdrom_multisession));
    1.17 +        for ( i = 0; i < sizeof(struct cdrom_multisession); i++ )
    1.18 +            if ( put_user(0, (byte *)(argument + i)) ) return -EFAULT;
    1.19          return 0;
    1.20  
    1.21      default: