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>] [day] [month] [year] [list]
Date:   Mon, 25 Oct 2021 01:18:53 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     Jon Maxwell <jmaxwell37@...il.com>
CC:     <kbuild-all@...ts.01.org>, Eric Dumazet <edumazet@...gle.com>,
        "David S . Miller" <davem@...emloft.net>,
        <yoshfuji@...ux-ipv6.org>, David Ahern <dsahern@...nel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        netdev <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        <jmaxwell37@...il.com>
Subject: Re: [net-next] tcp: don't free a FIN sk_buff in
 tcp_remove_empty_skb()

Hi Jon,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Jon-Maxwell/tcp-don-t-free-a-FIN-sk_buff-in-tcp_remove_empty_skb/20211021-072644
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 2641b62d2fab52648e34cdc6994b2eacde2d27c1
config: i386-randconfig-s002-20211021 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
         # apt-get install sparse
         # sparse version: v0.6.4-dirty
         # https://github.com/0day-ci/linux/commit/87f5ea309107de5183ec0bd7d0b48ec90546d350
         git remote add linux-review https://github.com/0day-ci/linux
         git fetch --no-tags linux-review Jon-Maxwell/tcp-don-t-free-a-FIN-sk_buff-in-tcp_remove_empty_skb/20211021-072644
         git checkout 87f5ea309107de5183ec0bd7d0b48ec90546d350
         # save the attached .config to linux build tree
         make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>


sparse warnings: (new ones prefixed by >>)
 >> net/ipv4/tcp.c:941:61: sparse: sparse: dubious: !x & y

vim +941 net/ipv4/tcp.c

0c54b85f282812 Ilpo Järvinen 2009-03-14  932
fdfc5c8594c24c Eric Dumazet  2019-08-26  933  /* In some cases, both sendpage() and sendmsg() could have added
fdfc5c8594c24c Eric Dumazet  2019-08-26  934   * an skb to the write queue, but failed adding payload on it.
fdfc5c8594c24c Eric Dumazet  2019-08-26  935   * We need to remove it to consume less memory, but more
fdfc5c8594c24c Eric Dumazet  2019-08-26  936   * importantly be able to generate EPOLLOUT for Edge Trigger epoll()
fdfc5c8594c24c Eric Dumazet  2019-08-26  937   * users.
fdfc5c8594c24c Eric Dumazet  2019-08-26  938   */
b796d04bd014fd Paolo Abeni   2020-11-16  939  void tcp_remove_empty_skb(struct sock *sk, struct sk_buff *skb)
fdfc5c8594c24c Eric Dumazet  2019-08-26  940  {
87f5ea309107de Jon Maxwell   2021-10-21 @941  	if (skb && !skb->len && !TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) {
fdfc5c8594c24c Eric Dumazet  2019-08-26  942  		tcp_unlink_write_queue(skb, sk);
fdfc5c8594c24c Eric Dumazet  2019-08-26  943  		if (tcp_write_queue_empty(sk))
fdfc5c8594c24c Eric Dumazet  2019-08-26  944  			tcp_chrono_stop(sk, TCP_CHRONO_BUSY);
fdfc5c8594c24c Eric Dumazet  2019-08-26  945  		sk_wmem_free_skb(sk, skb);
fdfc5c8594c24c Eric Dumazet  2019-08-26  946  	}
fdfc5c8594c24c Eric Dumazet  2019-08-26  947  }
fdfc5c8594c24c Eric Dumazet  2019-08-26  948

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (33947 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ