Skip to content

Commit

Permalink
firewire: use in_compat_syscall to check ioctl compatness
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
amluto authored and torvalds committed Mar 22, 2016
1 parent 2bf8c47 commit a25045f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/firewire/core-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,15 @@ 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;
}

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;
Expand Down

0 comments on commit a25045f

Please sign in to comment.