[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1483872450-2706-1-git-send-email-cugyly@163.com>
Date: Sun, 8 Jan 2017 18:47:30 +0800
From: yuan linyu <cugyly@....com>
To: netdev@...r.kernel.org
Cc: "David S . Miller" <davem@...emloft.net>,
yuan linyu <Linyu.Yuan@...atel-sbell.com.cn>
Subject: [PATCH] net: fix accept4() flags not work
From: yuan linyu <Linyu.Yuan@...atel-sbell.com.cn>
user input flags store to newsock which should be used.
Signed-off-by: yuan linyu <Linyu.Yuan@...atel-sbell.com.cn>
---
net/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/socket.c b/net/socket.c
index a8c2307..415f988 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1508,7 +1508,7 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
if (err)
goto out_fd;
- err = sock->ops->accept(sock, newsock, sock->file->f_flags);
+ err = sock->ops->accept(sock, newsock, newsock->file->f_flags);
if (err < 0)
goto out_fd;
--
2.7.4
Powered by blists - more mailing lists