diff options
| author | Andy Lutomirski <[email protected]> | 2016-03-22 21:25:13 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2016-03-22 22:36:02 +0000 |
| commit | a25045ff32dfb4d28c650560d5f2a82c1773dd1c (patch) | |
| tree | 2bf5af2237f8dcd102783e716f7513b2601363d8 /drivers/firewire/core-cdev.c | |
| parent | net/xfrm_user: use in_compat_syscall to deny compat syscalls (diff) | |
| download | kernel-a25045ff32dfb4d28c650560d5f2a82c1773dd1c.tar.gz kernel-a25045ff32dfb4d28c650560d5f2a82c1773dd1c.zip | |
firewire: use in_compat_syscall to check ioctl compatness
Firewire was using is_compat_task to check whether it was in a compat
ioctl or a non-compat ioctl. Use is_compat_syscall instead so it works
properly on all architectures.
Signed-off-by: Andy Lutomirski <[email protected]>
Cc: Clemens Ladisch <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/firewire/core-cdev.c')
| -rw-r--r-- | drivers/firewire/core-cdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 36a7c2d89a01..aee149bdf4c0 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -221,7 +221,7 @@ struct inbound_phy_packet_event { #ifdef CONFIG_COMPAT static void __user *u64_to_uptr(u64 value) { - if (is_compat_task()) + if (in_compat_syscall()) return compat_ptr(value); else return (void __user *)(unsigned long)value; @@ -229,7 +229,7 @@ static void __user *u64_to_uptr(u64 value) static u64 uptr_to_u64(void __user *ptr) { - if (is_compat_task()) + if (in_compat_syscall()) return ptr_to_compat(ptr); else return (u64)(unsigned long)ptr; |
