提交 9606a216 编写于 作者: D David S. Miller

[NET]: Fix dentry leak in sys_accept().

This regression was added by commit:
39d8c1b6
("Do not lose accepted socket when -ENFILE/-EMFILE.")

This is based upon a patch from Andi Kleen.

Thanks to Adrian Bridgett for narrowing down a good test case, and to
Andi Kleen and Andrew Morton for eyeballing this code.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 dbe5b4aa
......@@ -1455,7 +1455,7 @@ asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, int _
out:
return err;
out_fd:
put_filp(newfile);
fput(newfile);
put_unused_fd(newfd);
out_release:
sock_release(newsock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册