VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / char / ftape / zftape / zftape-init.c
index 1fc5fea..eefd94a 100644 (file)
@@ -88,9 +88,9 @@ static int zft_close(struct inode *ino, struct file *filep);
 static int  zft_ioctl(struct inode *ino, struct file *filep,
                      unsigned int command, unsigned long arg);
 static int  zft_mmap(struct file *filep, struct vm_area_struct *vma);
-static ssize_t zft_read (struct file *fp, char *buff,
+static ssize_t zft_read (struct file *fp, char __user *buff,
                         size_t req_len, loff_t *ppos);
-static ssize_t zft_write(struct file *fp, const char *buff,
+static ssize_t zft_write(struct file *fp, const char __user *buff,
                         size_t req_len, loff_t *ppos);
 
 static struct file_operations zft_cdev =
@@ -113,6 +113,7 @@ static int zft_open(struct inode *ino, struct file *filep)
        int result;
        TRACE_FUN(ft_t_flow);
 
+       nonseekable_open(ino, filep);
        TRACE(ft_t_flow, "called for minor %d", iminor(ino));
        if ( test_and_set_bit(0,&busy_flag) ) {
                TRACE_ABORT(-EBUSY, ft_t_warn, "failed: already busy");
@@ -177,7 +178,7 @@ static int zft_ioctl(struct inode *ino, struct file *filep,
        old_sigmask = current->blocked; /* save mask */
        sigfillset(&current->blocked);
        /* This will work as long as sizeof(void *) == sizeof(long) */
-       result = _zft_ioctl(command, (void *) arg);
+       result = _zft_ioctl(command, (void __user *) arg);
        current->blocked = old_sigmask; /* restore mask */
        TRACE_EXIT result;
 }
@@ -211,7 +212,7 @@ static int  zft_mmap(struct file *filep, struct vm_area_struct *vma)
 
 /*      Read from floppy tape device
  */
-static ssize_t zft_read(struct file *fp, char *buff,
+static ssize_t zft_read(struct file *fp, char __user *buff,
                        size_t req_len, loff_t *ppos)
 {
        int result = -EIO;
@@ -234,7 +235,7 @@ static ssize_t zft_read(struct file *fp, char *buff,
 
 /*      Write to tape device
  */
-static ssize_t zft_write(struct file *fp, const char *buff,
+static ssize_t zft_write(struct file *fp, const char __user *buff,
                         size_t req_len, loff_t *ppos)
 {
        int result = -EIO;