Signed-off-by: zhangcui <zhangcui11@huawei.com>
This commit is contained in:
zhangcui 2023-01-19 06:58:55 +00:00 committed by Gitee
parent 874fc9c3a0
commit ef577f7bc5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -965,8 +965,7 @@ public:
}
if (hasChangeKptr) {
hasChangeKptr = WriteStringToFile(KPTR_RESTRICT, oldKptrRestrict);
if (!hasChangeKptr) {
if (!WriteStringToFile(KPTR_RESTRICT, oldKptrRestrict)) {
printf("recover /proc/sys/kernel/kptr_restrict fail.\n");
}
}