forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-09 244b2c5ca8b14627e4a17755e5922221e121c771
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);