lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Aug 2015 15:55:00 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	fengguang.wu@...el.com
Cc:	santosh.shilimkar@...cle.com, kbuild-all@...org,
	ajaykumar.hotchandani@...cle.com, ssantosh@...nel.org,
	netdev@...r.kernel.org
Subject: Re: [net-next:master 1267/1290] net/rds/ib_recv.c:382:28: sparse:
 incorrect type in initializer (different base types)

From: kbuild test robot <fengguang.wu@...el.com>
Date: Wed, 26 Aug 2015 06:42:39 +0800

> sparse warnings: (new ones prefixed by >>)
> 
>>> net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types)
>    net/rds/ib_recv.c:382:28:    expected int [signed] can_wait
>    net/rds/ib_recv.c:382:28:    got restricted gfp_t
>    net/rds/ib_recv.c:828:23: sparse: cast to restricted __le64

Fixed by:

====================
[PATCH] rds: Fix improper gfp_t usage.

>> net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types)
   net/rds/ib_recv.c:382:28:    expected int [signed] can_wait
   net/rds/ib_recv.c:382:28:    got restricted gfp_t
   net/rds/ib_recv.c:828:23: sparse: cast to restricted __le64

Reported-by: kbuild test robot <fengguang.wu@...el.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
---
 net/rds/ib_recv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index 3afdcbd..ed9b41e 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -379,7 +379,7 @@ void rds_ib_recv_refill(struct rds_connection *conn, int prefill, gfp_t gfp)
 	struct ib_recv_wr *failed_wr;
 	unsigned int posted = 0;
 	int ret = 0;
-	int can_wait = gfp & __GFP_WAIT;
+	bool can_wait = !!(gfp & __GFP_WAIT);
 	u32 pos;
 
 	/* the goal here is to just make sure that someone, somewhere
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ