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:	Fri, 9 Oct 2015 09:08:14 +0800
From:	kbuild test robot <lkp@...el.com>
To:	Kosuke Tatsukawa <tatsu@...jp.nec.com>
Cc:	kbuild-all@...org,
	Trond Myklebust <trond.myklebust@...marydata.com>,
	Anna Schumaker <anna.schumaker@...app.com>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	Jeff Layton <jlayton@...chiereds.net>,
	"David S. Miller" <davem@...emloft.net>,
	"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sunrpc: fix waitqueue_active without memory barrier in
 sunrpc

Hi Kosuke,

[auto build test WARNING on v4.3-rc4 -- if it's inappropriate base, please ignore]

config: x86_64-randconfig-x002-201540 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from net/sunrpc/svcsock.c:22:
   net/sunrpc/svcsock.c: In function 'svc_udp_data_ready':
   net/sunrpc/svcsock.c:417:21: warning: passing argument 1 of 'wq_has_sleeper' from incompatible pointer type [-Wincompatible-pointer-types]
     if (wq_has_sleeper(wq))
                        ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
>> net/sunrpc/svcsock.c:417:2: note: in expansion of macro 'if'
     if (wq_has_sleeper(wq))
     ^
   In file included from include/net/inet_sock.h:27:0,
                    from include/linux/udp.h:20,
                    from net/sunrpc/svcsock.c:30:
   include/net/sock.h:1879:20: note: expected 'struct socket_wq *' but argument is of type 'wait_queue_head_t * {aka struct __wait_queue_head *}'
    static inline bool wq_has_sleeper(struct socket_wq *wq)
                       ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from net/sunrpc/svcsock.c:22:
   net/sunrpc/svcsock.c:417:21: warning: passing argument 1 of 'wq_has_sleeper' from incompatible pointer type [-Wincompatible-pointer-types]
     if (wq_has_sleeper(wq))
                        ^
   include/linux/compiler.h:147:40: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                                           ^
>> net/sunrpc/svcsock.c:417:2: note: in expansion of macro 'if'
     if (wq_has_sleeper(wq))
     ^
   In file included from include/net/inet_sock.h:27:0,
                    from include/linux/udp.h:20,
                    from net/sunrpc/svcsock.c:30:
   include/net/sock.h:1879:20: note: expected 'struct socket_wq *' but argument is of type 'wait_queue_head_t * {aka struct __wait_queue_head *}'
    static inline bool wq_has_sleeper(struct socket_wq *wq)
                       ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from net/sunrpc/svcsock.c:22:
   net/sunrpc/svcsock.c:417:21: warning: passing argument 1 of 'wq_has_sleeper' from incompatible pointer type [-Wincompatible-pointer-types]
     if (wq_has_sleeper(wq))
                        ^
   include/linux/compiler.h:158:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^
>> net/sunrpc/svcsock.c:417:2: note: in expansion of macro 'if'
     if (wq_has_sleeper(wq))
     ^
   In file included from include/net/inet_sock.h:27:0,
                    from include/linux/udp.h:20,
                    from net/sunrpc/svcsock.c:30:
   include/net/sock.h:1879:20: note: expected 'struct socket_wq *' but argument is of type 'wait_queue_head_t * {aka struct __wait_queue_head *}'
    static inline bool wq_has_sleeper(struct socket_wq *wq)
                       ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from net/sunrpc/svcsock.c:22:
   net/sunrpc/svcsock.c: In function 'svc_write_space':
   net/sunrpc/svcsock.c:435:21: warning: passing argument 1 of 'wq_has_sleeper' from incompatible pointer type [-Wincompatible-pointer-types]
     if (wq_has_sleeper(wq)) {
                        ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
   net/sunrpc/svcsock.c:435:2: note: in expansion of macro 'if'
     if (wq_has_sleeper(wq)) {
     ^
   In file included from include/net/inet_sock.h:27:0,
                    from include/linux/udp.h:20,
                    from net/sunrpc/svcsock.c:30:
   include/net/sock.h:1879:20: note: expected 'struct socket_wq *' but argument is of type 'wait_queue_head_t * {aka struct __wait_queue_head *}'
    static inline bool wq_has_sleeper(struct socket_wq *wq)
                       ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from net/sunrpc/svcsock.c:22:
   net/sunrpc/svcsock.c:435:21: warning: passing argument 1 of 'wq_has_sleeper' from incompatible pointer type [-Wincompatible-pointer-types]
     if (wq_has_sleeper(wq)) {
                        ^
   include/linux/compiler.h:147:40: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                                           ^
   net/sunrpc/svcsock.c:435:2: note: in expansion of macro 'if'
     if (wq_has_sleeper(wq)) {
     ^
   In file included from include/net/inet_sock.h:27:0,
                    from include/linux/udp.h:20,
                    from net/sunrpc/svcsock.c:30:
   include/net/sock.h:1879:20: note: expected 'struct socket_wq *' but argument is of type 'wait_queue_head_t * {aka struct __wait_queue_head *}'
    static inline bool wq_has_sleeper(struct socket_wq *wq)
                       ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from net/sunrpc/svcsock.c:22:
   net/sunrpc/svcsock.c:435:21: warning: passing argument 1 of 'wq_has_sleeper' from incompatible pointer type [-Wincompatible-pointer-types]
     if (wq_has_sleeper(wq)) {
                        ^
   include/linux/compiler.h:158:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^
   net/sunrpc/svcsock.c:435:2: note: in expansion of macro 'if'
     if (wq_has_sleeper(wq)) {
     ^
   In file included from include/net/inet_sock.h:27:0,
                    from include/linux/udp.h:20,
                    from net/sunrpc/svcsock.c:30:
   include/net/sock.h:1879:20: note: expected 'struct socket_wq *' but argument is of type 'wait_queue_head_t * {aka struct __wait_queue_head *}'
    static inline bool wq_has_sleeper(struct socket_wq *wq)
                       ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from net/sunrpc/svcsock.c:22:
   net/sunrpc/svcsock.c: In function 'svc_tcp_listen_data_ready':
   net/sunrpc/svcsock.c:790:21: warning: passing argument 1 of 'wq_has_sleeper' from incompatible pointer type [-Wincompatible-pointer-types]
     if (wq_has_sleeper(wq))
                        ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
   net/sunrpc/svcsock.c:790:2: note: in expansion of macro 'if'
     if (wq_has_sleeper(wq))
     ^
   In file included from include/net/inet_sock.h:27:0,
                    from include/linux/udp.h:20,
                    from net/sunrpc/svcsock.c:30:
   include/net/sock.h:1879:20: note: expected 'struct socket_wq *' but argument is of type 'wait_queue_head_t * {aka struct __wait_queue_head *}'
    static inline bool wq_has_sleeper(struct socket_wq *wq)
                       ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from net/sunrpc/svcsock.c:22:
   net/sunrpc/svcsock.c:790:21: warning: passing argument 1 of 'wq_has_sleeper' from incompatible pointer type [-Wincompatible-pointer-types]
     if (wq_has_sleeper(wq))
                        ^
   include/linux/compiler.h:147:40: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                                           ^
   net/sunrpc/svcsock.c:790:2: note: in expansion of macro 'if'
     if (wq_has_sleeper(wq))
     ^
   In file included from include/net/inet_sock.h:27:0,
                    from include/linux/udp.h:20,
                    from net/sunrpc/svcsock.c:30:
   include/net/sock.h:1879:20: note: expected 'struct socket_wq *' but argument is of type 'wait_queue_head_t * {aka struct __wait_queue_head *}'
    static inline bool wq_has_sleeper(struct socket_wq *wq)
                       ^

vim +/if +417 net/sunrpc/svcsock.c

   401	
   402	/*
   403	 * INET callback when data has been received on the socket.
   404	 */
   405	static void svc_udp_data_ready(struct sock *sk)
   406	{
   407		struct svc_sock	*svsk = (struct svc_sock *)sk->sk_user_data;
   408		wait_queue_head_t *wq = sk_sleep(sk);
   409	
   410		if (svsk) {
   411			dprintk("svc: socket %p(inet %p), busy=%d\n",
   412				svsk, sk,
   413				test_bit(XPT_BUSY, &svsk->sk_xprt.xpt_flags));
   414			set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
   415			svc_xprt_enqueue(&svsk->sk_xprt);
   416		}
 > 417		if (wq_has_sleeper(wq))
   418			wake_up_interruptible(wq);
   419	}
   420	
   421	/*
   422	 * INET callback when space is newly available on the socket.
   423	 */
   424	static void svc_write_space(struct sock *sk)
   425	{

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/octet-stream" (22104 bytes)

Powered by blists - more mailing lists