summaryrefslogtreecommitdiffstats
path: root/net/compat.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-03-13 19:54:17 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2018-04-02 20:15:16 +0200
commitd27e9afc64206b5a2fe02561716cee5be9aacf01 (patch)
treecc0387e3ad2daa7a0b8d95d819388a96659a5870 /net/compat.c
parentf3bf896b1d041153ea1c6cfa58f6f4658c91089f (diff)
downloadlinux-d27e9afc64206b5a2fe02561716cee5be9aacf01.tar.gz
linux-d27e9afc64206b5a2fe02561716cee5be9aacf01.tar.bz2
linux-d27e9afc64206b5a2fe02561716cee5be9aacf01.zip
net: socket: replace call to sys_recv() with __sys_recvfrom()
sys_recv() merely expands the parameters to __sys_recvfrom() by NULL and NULL. Open-code this in the two places which used sys_recv() as a wrapper to __sys_recvfrom(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: David S. Miller <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'net/compat.c')
-rw-r--r--net/compat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/compat.c b/net/compat.c
index d55982ff5c59..9e0d030063ad 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -755,7 +755,8 @@ COMPAT_SYSCALL_DEFINE3(recvmsg, int, fd, struct compat_msghdr __user *, msg, uns
COMPAT_SYSCALL_DEFINE4(recv, int, fd, void __user *, buf, compat_size_t, len, unsigned int, flags)
{
- return sys_recv(fd, buf, len, flags | MSG_CMSG_COMPAT);
+ return __sys_recvfrom(fd, buf, len, flags | MSG_CMSG_COMPAT, NULL,
+ NULL);
}
COMPAT_SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, buf, compat_size_t, len,