hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
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);