We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95a301e commit 935d44aCopy full SHA for 935d44a
mm/memfd.c
@@ -371,12 +371,15 @@ SYSCALL_DEFINE2(memfd_create,
371
372
inode->i_mode &= ~0111;
373
file_seals = memfd_file_seals_ptr(file);
374
- *file_seals &= ~F_SEAL_SEAL;
375
- *file_seals |= F_SEAL_EXEC;
+ if (file_seals) {
+ *file_seals &= ~F_SEAL_SEAL;
376
+ *file_seals |= F_SEAL_EXEC;
377
+ }
378
} else if (flags & MFD_ALLOW_SEALING) {
379
/* MFD_EXEC and MFD_ALLOW_SEALING are set */
380
381
+ if (file_seals)
382
383
}
384
385
fd_install(fd, file);
0 commit comments