diff options
author | tadeusz.struk@intel.com <tadeusz.struk@intel.com> | 2015-12-15 10:46:17 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-22 20:54:15 -0800 |
commit | 1c72e110be7f6860ccb4e226beb34e2c4537f6bb (patch) | |
tree | 10e1d10a46da5b75f7548f05398e610692a39c9b /net | |
parent | 1814295365a02ff174948159f1eececa55fe4f97 (diff) |
net: fix uninitialized variable issue
[ Upstream commit 130ed5d105dde141e7fe60d5440aa53e0a84f13b ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/socket.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index 884e32997698..dcbfa868e398 100644 --- a/net/socket.c +++ b/net/socket.c @@ -1705,6 +1705,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); |