Re: [PATCH rds linux-next v2 2/2] net/rds: remove user triggered WARN_ON in rds_sendmsg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: kbuild test robot <lkp@xxxxxxxxx>
Date: Thu, 20 Dec 2018 10:20:17 +0800

> All warnings (new ones prefixed by >>):
> 
>    net/rds/send.c:1038:24: warning: incorrect type in argument 1 (different base types)
>    net/rds/send.c:1038:24:    expected unsigned int [unsigned] [usertype] a
>    net/rds/send.c:1038:24:    got restricted __be16 [usertype] sin6_port
>    net/rds/send.c:1040:24: warning: incorrect type in argument 1 (different base types)
>    net/rds/send.c:1040:24:    expected unsigned int [unsigned] [usertype] a
>    net/rds/send.c:1040:24:    got restricted __be16 [usertype] sin6_port
>>> net/rds/send.c:1109:42: warning: Using plain integer as NULL pointer

I'll fix this:

====================
>From d84e7bc0595a7e146ad0ddb80b240cea77825245 Mon Sep 17 00:00:00 2001
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Wed, 19 Dec 2018 20:53:18 -0800
Subject: [PATCH] rds: Fix warning.

>> net/rds/send.c:1109:42: warning: Using plain integer as NULL pointer

Fixes: ea010070d0a7 ("net/rds: fix warn in rds_message_alloc_sgs")
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
---
 net/rds/send.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/rds/send.c b/net/rds/send.c
index b39b30706210..3d822bad7de9 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -1109,9 +1109,11 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
 		      sock_flag(rds_rs_to_sk(rs), SOCK_ZEROCOPY));
 	int num_sgs = ceil(payload_len, PAGE_SIZE);
 	int namelen;
-	struct rds_iov_vector_arr vct = {0};
+	struct rds_iov_vector_arr vct;
 	int ind;
 
+	memset(&vct, 0, sizeof(vct));
+
 	/* expect 1 RDMA CMSG per rds_sendmsg. can still grow if more needed. */
 	vct.incr = 1;
 
-- 
2.19.2




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux