lkml.org 
[lkml]   [2015]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] net: fix uninitialized variable issue
From
Date
On Tue, 2015-12-15 at 10:46 -0800, Tadeusz Struk wrote:
> 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);
>

Do not add "Cc: stable@vger.kernel.org" for networking patches, thanks
( Documentation/networking/netdev-FAQ.txt )

Do you know when was this bug added ?

Please add the

Fixes: 12-digit-sha1 ("patch title")

Thanks.




\
 
 \ /
  Last update: 2015-12-15 20:21    [W:0.219 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site