Use in_compat_syscall() instead of is_compat_task() if available

This commit is contained in:
Sergei Makarenkov 2017-01-21 23:44:28 +03:00 committed by astsam
parent 7cd3949722
commit 647020663d
2 changed files with 11 additions and 3 deletions

View File

@ -13120,8 +13120,12 @@ static int rtw_ioctl_standard_wext_private(struct net_device *dev, struct ifreq
static int rtw_ioctl_wext_private(struct net_device *dev, struct ifreq *rq) static int rtw_ioctl_wext_private(struct net_device *dev, struct ifreq *rq)
{ {
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
if (is_compat_task()) #ifdef in_compat_syscall
return rtw_ioctl_compat_wext_private(dev, rq); if(in_compat_syscall())
#else
if(is_compat_task())
#endif
return rtw_ioctl_compat_wext_private( dev, rq );
else else
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
return rtw_ioctl_standard_wext_private(dev, rq); return rtw_ioctl_standard_wext_private(dev, rq);

View File

@ -593,7 +593,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto exit; goto exit;
} }
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
if (is_compat_task()) { #ifdef in_compat_syscall
if(in_compat_syscall()) {
#else
if(is_compat_task()) {
#endif
/* User space is 32-bit, use compat ioctl */ /* User space is 32-bit, use compat ioctl */
compat_android_wifi_priv_cmd compat_priv_cmd; compat_android_wifi_priv_cmd compat_priv_cmd;