mtwifi: disable set_fs by default

This fixes various kernel panic issues.
This commit is contained in:
AmadeusGhost 2022-12-08 23:50:35 +08:00
parent 22746824c5
commit 048637aba2
2 changed files with 16 additions and 20 deletions

View File

@ -914,17 +914,15 @@ static inline void __RtmpOSFSInfoChange(OS_FS_INFO * pOSFSInfo, BOOLEAN bSet)
#endif
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
pOSFSInfo->fs = get_fs();
set_fs(KERNEL_DS);
#endif
} else {
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
set_fs(pOSFSInfo->fs);
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
current->fsuid = pOSFSInfo->fsuid;
current->fsgid = pOSFSInfo->fsgid;
#endif
#endif
}
}
@ -1940,7 +1938,7 @@ VOID RtmpDrvAllMacPrint(
if (!msg)
return;
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
orig_fs = get_fs();
set_fs(KERNEL_DS);
#endif
@ -1971,7 +1969,7 @@ VOID RtmpDrvAllMacPrint(
}
filp_close(file_w, NULL);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
set_fs(orig_fs);
#endif
os_free_mem(NULL, msg);
@ -1995,7 +1993,7 @@ VOID RtmpDrvAllE2PPrint(
if (!msg)
return;
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
orig_fs = get_fs();
set_fs(KERNEL_DS);
#endif
@ -2027,7 +2025,7 @@ VOID RtmpDrvAllE2PPrint(
}
filp_close(file_w, NULL);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
set_fs(orig_fs);
#endif
os_free_mem(NULL, msg);
@ -2043,7 +2041,7 @@ VOID RtmpDrvAllRFPrint(
RTMP_STRING *fileName = "RFDump.txt";
mm_segment_t orig_fs;
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
orig_fs = get_fs();
set_fs(KERNEL_DS);
#endif
@ -2062,7 +2060,7 @@ VOID RtmpDrvAllRFPrint(
}
filp_close(file_w, NULL);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
set_fs(orig_fs);
#endif
}

View File

@ -865,17 +865,15 @@ static inline void __RtmpOSFSInfoChange(OS_FS_INFO *pOSFSInfo, BOOLEAN bSet)
/* pOSFSInfo->fsgid = (int)(current_fsgid()); */
#endif
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
#if 0
pOSFSInfo->fs = get_fs();
set_fs(KERNEL_DS);
#endif
} else {
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
set_fs(pOSFSInfo->fs);
#endif
#if (KERNEL_VERSION(2, 6, 29) > LINUX_VERSION_CODE)
current->fsuid = pOSFSInfo->fsuid;
current->fsgid = pOSFSInfo->fsgid;
#endif
#endif
}
}
@ -1929,7 +1927,7 @@ VOID RtmpDrvAllMacPrint(
if (!msg)
return;
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
orig_fs = get_fs();
set_fs(KERNEL_DS);
#endif
@ -1974,7 +1972,7 @@ VOID RtmpDrvAllMacPrint(
filp_close(file_w, NULL);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
set_fs(orig_fs);
#endif
os_free_mem(msg);
@ -1999,7 +1997,7 @@ VOID RtmpDrvAllE2PPrint(
if (!msg)
return;
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
orig_fs = get_fs();
set_fs(KERNEL_DS);
#endif
@ -2045,7 +2043,7 @@ VOID RtmpDrvAllE2PPrint(
filp_close(file_w, NULL);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
set_fs(orig_fs);
#endif
os_free_mem(msg);
@ -2061,7 +2059,7 @@ VOID RtmpDrvAllRFPrint(
RTMP_STRING *fileName = "RFDump.txt";
mm_segment_t orig_fs;
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
orig_fs = get_fs();
set_fs(KERNEL_DS);
#endif
@ -2095,7 +2093,7 @@ VOID RtmpDrvAllRFPrint(
filp_close(file_w, NULL);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#if 0
set_fs(orig_fs);
#endif
}