summaryrefslogtreecommitdiff
path: root/net/qrtr/qrtr.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-05 09:59:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-05 09:59:21 +0300
commit9594408763d439287742d5582842db6a476bbd71 (patch)
tree2a0787dae55a3372108837cc8ce3261beac6ff46 /net/qrtr/qrtr.c
parent202680c7a93713283207dedfbc4b550ad6836a43 (diff)
parente49d033bddf5b565044e2abe4241353959bc9120 (diff)
downloadlinux-9594408763d439287742d5582842db6a476bbd71.tar.xz
Merge 5.12-rc6 into tty-next
We need the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/qrtr/qrtr.c')
-rw-r--r--net/qrtr/qrtr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c
index edb6ac17ceca..dfc820ee553a 100644
--- a/net/qrtr/qrtr.c
+++ b/net/qrtr/qrtr.c
@@ -1058,6 +1058,11 @@ static int qrtr_recvmsg(struct socket *sock, struct msghdr *msg,
rc = copied;
if (addr) {
+ /* There is an anonymous 2-byte hole after sq_family,
+ * make sure to clear it.
+ */
+ memset(addr, 0, sizeof(*addr));
+
addr->sq_family = AF_QIPCRTR;
addr->sq_node = cb->src_node;
addr->sq_port = cb->src_port;