Netdev List
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: kbuild-all@01.org, David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v3 net] dccp/tcp: fix ireq->opt races
Date: Sat, 21 Oct 2017 08:36:56 +0800	[thread overview]
Message-ID: <201710210847.8D0jfxwE%fengguang.wu@intel.com> (raw)
In-Reply-To: <1508451889.30291.4.camel@edumazet-glaptop3.roam.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 17847 bytes --]

Hi Eric,

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Eric-Dumazet/dccp-tcp-fix-ireq-opt-races/20171021-034024
config: powerpc-ppc6xx_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All warnings (new ones prefixed by >>):

   In file included from arch/powerpc/include/asm/atomic.h:10:0,
                    from include/linux/atomic.h:4,
                    from include/linux/rcupdate.h:38,
                    from net/ipv4/cipso_ipv4.c:40:
   net/ipv4/cipso_ipv4.c: In function 'cipso_v4_req_setattr':
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:203:15: note: in definition of macro 'xchg_relaxed'
     __typeof__(*(ptr)) _x_ = (x);     \
                  ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
>> arch/powerpc/include/asm/cmpxchg.h:203:27: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     __typeof__(*(ptr)) _x_ = (x);     \
                              ^
>> include/linux/atomic.h:65:9: note: in expansion of macro 'xchg_relaxed'
     typeof(op##_relaxed(args)) __ret;    \
            ^~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:16: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                   ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:39: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                                          ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:205:33: note: in definition of macro 'xchg_relaxed'
       (unsigned long)_x_, sizeof(*(ptr)));  \
                                    ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:203:15: note: in definition of macro 'xchg_relaxed'
     __typeof__(*(ptr)) _x_ = (x);     \
                  ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
>> arch/powerpc/include/asm/cmpxchg.h:203:27: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     __typeof__(*(ptr)) _x_ = (x);     \
                              ^
   include/linux/atomic.h:67:10: note: in expansion of macro 'xchg_relaxed'
     __ret = op##_relaxed(args);     \
             ^~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:16: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                   ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:39: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                                          ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:205:33: note: in definition of macro 'xchg_relaxed'
       (unsigned long)_x_, sizeof(*(ptr)));  \
                                    ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     opt = xchg(&req_inet->opt, opt);
         ^
   net/ipv4/cipso_ipv4.c: In function 'cipso_v4_req_delattr':
   net/ipv4/cipso_ipv4.c:2073:16: error: 'struct inet_request_sock' has no member named 'opt'
     opt = req_inet->opt;
                   ^~
   net/ipv4/cipso_ipv4.c:2077:27: error: 'struct inet_request_sock' has no member named 'opt'
     cipso_v4_delopt(&req_inet->opt);
                              ^~
--
   In file included from arch/powerpc/include/asm/atomic.h:10:0,
                    from include/linux/atomic.h:4,
                    from include/linux/rcupdate.h:38,
                    from net//ipv4/cipso_ipv4.c:40:
   net//ipv4/cipso_ipv4.c: In function 'cipso_v4_req_setattr':
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:203:15: note: in definition of macro 'xchg_relaxed'
     __typeof__(*(ptr)) _x_ = (x);     \
                  ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
>> arch/powerpc/include/asm/cmpxchg.h:203:27: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     __typeof__(*(ptr)) _x_ = (x);     \
                              ^
>> include/linux/atomic.h:65:9: note: in expansion of macro 'xchg_relaxed'
     typeof(op##_relaxed(args)) __ret;    \
            ^~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:16: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                   ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:39: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                                          ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:205:33: note: in definition of macro 'xchg_relaxed'
       (unsigned long)_x_, sizeof(*(ptr)));  \
                                    ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:203:15: note: in definition of macro 'xchg_relaxed'
     __typeof__(*(ptr)) _x_ = (x);     \
                  ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
>> arch/powerpc/include/asm/cmpxchg.h:203:27: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     __typeof__(*(ptr)) _x_ = (x);     \
                              ^
   include/linux/atomic.h:67:10: note: in expansion of macro 'xchg_relaxed'
     __ret = op##_relaxed(args);     \
             ^~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:16: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                   ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:39: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                                          ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:205:33: note: in definition of macro 'xchg_relaxed'
       (unsigned long)_x_, sizeof(*(ptr)));  \
                                    ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     opt = xchg(&req_inet->opt, opt);
         ^
   net//ipv4/cipso_ipv4.c: In function 'cipso_v4_req_delattr':
   net//ipv4/cipso_ipv4.c:2073:16: error: 'struct inet_request_sock' has no member named 'opt'
     opt = req_inet->opt;
                   ^~
   net//ipv4/cipso_ipv4.c:2077:27: error: 'struct inet_request_sock' has no member named 'opt'
     cipso_v4_delopt(&req_inet->opt);
                              ^~

vim +203 arch/powerpc/include/asm/cmpxchg.h

ae3a197e David Howells 2012-03-28  175  
ae3a197e David Howells 2012-03-28  176  static __always_inline unsigned long
26760fc1 Boqun Feng    2015-12-15  177  __xchg_relaxed(void *ptr, unsigned long x, unsigned int size)
ae3a197e David Howells 2012-03-28  178  {
ae3a197e David Howells 2012-03-28  179  	switch (size) {
d0563a12 Pan Xinhui    2016-04-27  180  	case 1:
d0563a12 Pan Xinhui    2016-04-27  181  		return __xchg_u8_relaxed(ptr, x);
d0563a12 Pan Xinhui    2016-04-27  182  	case 2:
d0563a12 Pan Xinhui    2016-04-27  183  		return __xchg_u16_relaxed(ptr, x);
ae3a197e David Howells 2012-03-28  184  	case 4:
26760fc1 Boqun Feng    2015-12-15  185  		return __xchg_u32_relaxed(ptr, x);
ae3a197e David Howells 2012-03-28  186  #ifdef CONFIG_PPC64
ae3a197e David Howells 2012-03-28  187  	case 8:
26760fc1 Boqun Feng    2015-12-15  188  		return __xchg_u64_relaxed(ptr, x);
ae3a197e David Howells 2012-03-28  189  #endif
ae3a197e David Howells 2012-03-28  190  	}
10d8b148 pan xinhui    2016-02-23  191  	BUILD_BUG_ON_MSG(1, "Unsupported size for __xchg_local");
ae3a197e David Howells 2012-03-28  192  	return x;
ae3a197e David Howells 2012-03-28  193  }
26760fc1 Boqun Feng    2015-12-15  194  #define xchg_local(ptr,x)						     \
ae3a197e David Howells 2012-03-28  195    ({									     \
ae3a197e David Howells 2012-03-28  196       __typeof__(*(ptr)) _x_ = (x);					     \
26760fc1 Boqun Feng    2015-12-15  197       (__typeof__(*(ptr))) __xchg_local((ptr),				     \
26760fc1 Boqun Feng    2015-12-15  198       		(unsigned long)_x_, sizeof(*(ptr))); 			     \
ae3a197e David Howells 2012-03-28  199    })
ae3a197e David Howells 2012-03-28  200  
26760fc1 Boqun Feng    2015-12-15  201  #define xchg_relaxed(ptr, x)						\
ae3a197e David Howells 2012-03-28  202  ({									\
ae3a197e David Howells 2012-03-28 @203  	__typeof__(*(ptr)) _x_ = (x);					\
26760fc1 Boqun Feng    2015-12-15  204  	(__typeof__(*(ptr))) __xchg_relaxed((ptr),			\
ae3a197e David Howells 2012-03-28  205  			(unsigned long)_x_, sizeof(*(ptr)));		\
ae3a197e David Howells 2012-03-28  206  })
ae3a197e David Howells 2012-03-28  207  /*
ae3a197e David Howells 2012-03-28  208   * Compare and exchange - if *p == old, set it to new,
ae3a197e David Howells 2012-03-28  209   * and return the old value of *p.
ae3a197e David Howells 2012-03-28  210   */
ae3a197e David Howells 2012-03-28  211  

:::::: The code at line 203 was first introduced by commit
:::::: ae3a197e3d0bfe3f4bf1693723e82dc018c096f3 Disintegrate asm/system.h for PowerPC

:::::: TO: David Howells <dhowells@redhat.com>
:::::: CC: David Howells <dhowells@redhat.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29168 bytes --]

      parent reply	other threads:[~2017-10-21  0:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19 22:24 [PATCH v3 net] dccp/tcp: fix ireq->opt races Eric Dumazet
2017-10-20  6:04 ` David Miller
2017-10-20  6:18   ` David Miller
2017-10-20 15:58     ` Eric Dumazet
2017-10-20 16:04 ` [PATCH v4 net] tcp/dccp: " Eric Dumazet
2017-10-21  1:18   ` David Miller
2017-10-20 21:26 ` [PATCH v3 net] dccp/tcp: " kbuild test robot
2017-10-20 21:39   ` Eric Dumazet
2017-10-21  0:36 ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201710210847.8D0jfxwE%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox