forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/mm/memfd.c
....@@ -330,7 +330,8 @@
330330
331331 if (flags & MFD_ALLOW_SEALING) {
332332 file_seals = memfd_file_seals_ptr(file);
333
- *file_seals &= ~F_SEAL_SEAL;
333
+ if (file_seals)
334
+ *file_seals &= ~F_SEAL_SEAL;
334335 }
335336
336337 fd_install(fd, file);