| .. | .. |
|---|
| 790 | 790 | } |
|---|
| 791 | 791 | EXPORT_SYMBOL(compat_ptr_ioctl); |
|---|
| 792 | 792 | |
|---|
| 793 | +/** |
|---|
| 794 | + * compat_ptr_oob_ioctl - generic implementation of .compat_oob_ioctl file operation |
|---|
| 795 | + * |
|---|
| 796 | + * The equivalent of compat_ptr_ioctl, dealing with out-of-band ioctl |
|---|
| 797 | + * calls. Management of this handler is delegated to the code |
|---|
| 798 | + * implementing the out-of-band ioctl() syscall in the companion core. |
|---|
| 799 | + */ |
|---|
| 800 | +long compat_ptr_oob_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
|---|
| 801 | +{ |
|---|
| 802 | + if (!file->f_op->oob_ioctl) |
|---|
| 803 | + return -ENOIOCTLCMD; |
|---|
| 804 | + |
|---|
| 805 | + return file->f_op->oob_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); |
|---|
| 806 | +} |
|---|
| 807 | +EXPORT_SYMBOL(compat_ptr_oob_ioctl); |
|---|
| 808 | + |
|---|
| 793 | 809 | COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, |
|---|
| 794 | 810 | compat_ulong_t, arg) |
|---|
| 795 | 811 | { |
|---|