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] [day] [month] [year] [list]
Date:   Thu, 21 Oct 2021 13:35:22 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jon Maxwell <jmaxwell37@...il.com>, edumazet@...gle.com
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org, davem@...emloft.net,
        yoshfuji@...ux-ipv6.org, dsahern@...nel.org, kuba@...nel.org,
        netdev@...r.kernel.org, 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-a004-20211021 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 3cea2505fd8d99a9ba0cb625aecfe28a47c4e3f8)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # 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
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>):

>> net/ipv4/tcp.c:941:26: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
           if (skb && !skb->len && !TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) {
                                   ^                           ~
   net/ipv4/tcp.c:941:26: note: add parentheses after the '!' to evaluate the bitwise operator first
           if (skb && !skb->len && !TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) {
                                   ^
                                    (                                      )
   net/ipv4/tcp.c:941:26: note: add parentheses around left hand side expression to silence this warning
           if (skb && !skb->len && !TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) {
                                   ^
                                   (                          )
   1 warning generated.


vim +941 net/ipv4/tcp.c

   932	
   933	/* In some cases, both sendpage() and sendmsg() could have added
   934	 * an skb to the write queue, but failed adding payload on it.
   935	 * We need to remove it to consume less memory, but more
   936	 * importantly be able to generate EPOLLOUT for Edge Trigger epoll()
   937	 * users.
   938	 */
   939	void tcp_remove_empty_skb(struct sock *sk, struct sk_buff *skb)
   940	{
 > 941		if (skb && !skb->len && !TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) {
   942			tcp_unlink_write_queue(skb, sk);
   943			if (tcp_write_queue_empty(sk))
   944				tcp_chrono_stop(sk, TCP_CHRONO_BUSY);
   945			sk_wmem_free_skb(sk, skb);
   946		}
   947	}
   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" (29372 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ