summaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authortadeusz.struk@intel.com <tadeusz.struk@intel.com>2015-12-15 10:46:17 -0800
committerDavid S. Miller <davem@davemloft.net>2015-12-15 15:46:48 -0500
commit130ed5d105dde141e7fe60d5440aa53e0a84f13b (patch)
tree0f79eb596cd5c9f333883620f2fce3e73a67a1ee /net/socket.c
parent5233252fce714053f0151680933571a2da9cbfb4 (diff)
downloadlinux-130ed5d105dde141e7fe60d5440aa53e0a84f13b.tar.gz
linux-130ed5d105dde141e7fe60d5440aa53e0a84f13b.tar.bz2
linux-130ed5d105dde141e7fe60d5440aa53e0a84f13b.zip
net: fix uninitialized variable issue
msg_iocb needs to be initialized on the recv/recvfrom path. Otherwise afalg will wrongly interpret it as an async call. Cc: stable@vger.kernel.org Reported-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c
index 456fadb3d819..29822d6dd91e 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1695,6 +1695,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
msg.msg_name = addr ? (struct sockaddr *)&address : NULL;
/* We assume all kernel code knows the size of sockaddr_storage */
msg.msg_namelen = 0;
+ msg.msg_iocb = NULL;
if (sock->file->f_flags & O_NONBLOCK)
flags |= MSG_DONTWAIT;
err = sock_recvmsg(sock, &msg, iov_iter_count(&msg.msg_iter), flags);