Skip to content

Commit a25045f

Browse files
amlutotorvalds
authored andcommitted
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 <luto@kernel.org> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 2bf8c47 commit a25045f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/firewire/core-cdev.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,15 @@ struct inbound_phy_packet_event {
221221
#ifdef CONFIG_COMPAT
222222
static void __user *u64_to_uptr(u64 value)
223223
{
224-
if (is_compat_task())
224+
if (in_compat_syscall())
225225
return compat_ptr(value);
226226
else
227227
return (void __user *)(unsigned long)value;
228228
}
229229

230230
static u64 uptr_to_u64(void __user *ptr)
231231
{
232-
if (is_compat_task())
232+
if (in_compat_syscall())
233233
return ptr_to_compat(ptr);
234234
else
235235
return (u64)(unsigned long)ptr;

0 commit comments

Comments
 (0)