VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Kees Cook <keescook@chromium.org> 2021-10-28 14:36:21 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-10-28 17:18:55 -0700 commit: 855d44434fa24d5344c1cb0edb38723f891cd415 parent: 6f1b228529ae49b0f85ab89bcdb6c365df401558
Commit Summary:
mm/secretmem: avoid letting secretmem_users drop to zero
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/mm/secretmem.c b/mm/secretmem.c
index c2dda408bb36..22b310adb53d 100644
--- a/mm/secretmem.c
+++ b/mm/secretmem.c
@@ -218,8 +218,8 @@ SYSCALL_DEFINE1(memfd_secret, unsigned int, flags)
 
 	file->f_flags |= O_LARGEFILE;
 
-	fd_install(fd, file);
 	atomic_inc(&secretmem_users);
+	fd_install(fd, file);
 	return fd;
 
 err_put_fd: