Skip to content

Commit 9802274

Browse files
author
Al Viro
committed
eventpoll: use-after-possible-free in epoll_create1()
As soon as we'd installed the file into descriptor table, it can get closed by another thread. Freeing ep in process... Signed-off-by: Al Viro <[email protected]>
1 parent 31605de commit 9802274

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/eventpoll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,8 +1654,8 @@ SYSCALL_DEFINE1(epoll_create1, int, flags)
16541654
error = PTR_ERR(file);
16551655
goto out_free_fd;
16561656
}
1657-
fd_install(fd, file);
16581657
ep->file = file;
1658+
fd_install(fd, file);
16591659
return fd;
16601660

16611661
out_free_fd:

0 commit comments

Comments
 (0)