1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-25 14:44:09 +00:00

Do not specify type in access_ok

In kernels starting from 5.0.0 it is not possible to specify desired access type
This commit is contained in:
Kamil Lorenc 2019-05-26 17:19:12 +02:00
parent ae733769ea
commit 903d725f9f

View File

@ -630,7 +630,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto exit;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0))
if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) {
#else
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
#endif
RTW_INFO("%s: failed to access memory\n", __FUNCTION__);
ret = -EFAULT;
goto exit;