OSDN Git Service

net: initialize msg.msg_flags in recvfrom
authorAlexander Potapenko <glider@google.com>
Wed, 8 Mar 2017 17:08:16 +0000 (18:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:04:53 +0000 (10:04 +0100)
commitaccbd99507b1b22a0402cfd7b385a87a541f404d
treedaca33c653c77181eeb51057da8d83057ea85380
parentb5213e1e9f25ccde958aa6364815ee87fef91100
net: initialize msg.msg_flags in recvfrom

[ Upstream commit 9f138fa609c47403374a862a08a41394be53d461 ]

KMSAN reports a use of uninitialized memory in put_cmsg() because
msg.msg_flags in recvfrom haven't been initialized properly.
The flag values don't affect the result on this path, but it's still a
good idea to initialize them explicitly.

Signed-off-by: Alexander Potapenko <glider@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/socket.c