Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101345
b: refs/heads/master
c: 3aea50a
h: refs/heads/master
i:
  101343: 684c660
v: v3
  • Loading branch information
Alan Cox authored and Stefan Richter committed Jul 14, 2008
1 parent 59d26e9 commit 72405ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 055a7da0bb7b14f2f5009bf1c486a6e965e1e7ac
refs/heads/master: 3aea50a379ed152bcb86b24b65a4cb59be82446f
20 changes: 15 additions & 5 deletions trunk/drivers/ieee1394/raw1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -2549,8 +2549,8 @@ static int raw1394_mmap(struct file *file, struct vm_area_struct *vma)
}

/* ioctl is only used for rawiso operations */
static int raw1394_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
static long do_raw1394_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
struct file_info *fi = file->private_data;
void __user *argp = (void __user *)arg;
Expand Down Expand Up @@ -2656,6 +2656,16 @@ static int raw1394_ioctl(struct inode *inode, struct file *file,
return -EINVAL;
}

static long raw1394_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
long ret;
lock_kernel();
ret = do_raw1394_ioctl(file, cmd, arg);
unlock_kernel();
return ret;
}

#ifdef CONFIG_COMPAT
struct raw1394_iso_packets32 {
__u32 n_packets;
Expand Down Expand Up @@ -2690,7 +2700,7 @@ static long raw1394_iso_xmit_recv_packets32(struct file *file, unsigned int cmd,
!copy_from_user(&infos32, &arg->infos, sizeof infos32)) {
infos = compat_ptr(infos32);
if (!copy_to_user(&dst->infos, &infos, sizeof infos))
err = raw1394_ioctl(NULL, file, cmd, (unsigned long)dst);
err = do_raw1394_ioctl(file, cmd, (unsigned long)dst);
}
return err;
}
Expand Down Expand Up @@ -2731,7 +2741,7 @@ static long raw1394_compat_ioctl(struct file *file,
case RAW1394_IOC_ISO_GET_STATUS:
case RAW1394_IOC_ISO_SHUTDOWN:
case RAW1394_IOC_ISO_QUEUE_ACTIVITY:
err = raw1394_ioctl(NULL, file, cmd, arg);
err = do_raw1394_ioctl(file, cmd, arg);
break;
/* These request have different format. */
case RAW1394_IOC_ISO_RECV_PACKETS32:
Expand Down Expand Up @@ -2984,7 +2994,7 @@ static const struct file_operations raw1394_fops = {
.read = raw1394_read,
.write = raw1394_write,
.mmap = raw1394_mmap,
.ioctl = raw1394_ioctl,
.unlocked_ioctl = raw1394_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = raw1394_compat_ioctl,
#endif
Expand Down

0 comments on commit 72405ee

Please sign in to comment.