Skip to content

Commit

Permalink
eventpoll: use-after-possible-free in epoll_create1()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Al Viro committed Aug 22, 2012
1 parent 31605de commit 9802274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/eventpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -1654,8 +1654,8 @@ SYSCALL_DEFINE1(epoll_create1, int, flags)
error = PTR_ERR(file);
goto out_free_fd;
}
fd_install(fd, file);
ep->file = file;
fd_install(fd, file);
return fd;

out_free_fd:
Expand Down

0 comments on commit 9802274

Please sign in to comment.