Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1292460

[PATCH] net: fix uninitialized variable issue

From Tadeusz Struk <tadeusz.struk@intel.com>
Newsgroups linux.kernel
Subject [PATCH] net: fix uninitialized variable issue
Date 2015-12-15 19:50 +0100
Message-ID <qG2PE-7Xw-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 net/socket.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/socket.c b/net/socket.c
index dd2c247..80ca820 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1702,6 +1702,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);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] net: fix uninitialized variable issue Tadeusz Struk <tadeusz.struk@intel.com> - 2015-12-15 19:50 +0100
  Re: [PATCH] net: fix uninitialized variable issue Eric Dumazet <eric.dumazet@gmail.com> - 2015-12-15 20:10 +0100
    Re: [PATCH] net: fix uninitialized variable issue Tadeusz Struk <tadeusz.struk@intel.com> - 2015-12-15 23:50 +0100
      Re: [PATCH] net: fix uninitialized variable issue Eric Dumazet <eric.dumazet@gmail.com> - 2015-12-16 00:20 +0100
  Re: [PATCH] net: fix uninitialized variable issue David Miller <davem@davemloft.net> - 2015-12-15 21:50 +0100

csiph-web