mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jon Maxwell <jmaxwell37@gmail.com>, edumazet@google.com
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org,
	kuba@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, jmaxwell37@gmail.com
Subject: Re: [net-next] tcp: don't free a FIN sk_buff in tcp_remove_empty_skb()
Date: Thu, 21 Oct 2021 13:35:22 +0800	[thread overview]
Message-ID: <202110211304.4OdQcHLx-lkp@intel.com> (raw)
In-Reply-To: <20211020232447.9548-1-jmaxwell37@gmail.com>

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

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@intel.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

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

  parent reply	other threads:[~2021-10-21  5:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20 23:24 Jon Maxwell
2021-10-21  1:10 ` Eric Dumazet
2021-10-21  1:48   ` Jonathan Maxwell
2021-10-21  5:35 ` kernel test robot [this message]
     [not found] <202110221513.52ubgVaN-lkp@intel.com>
2021-10-24 17:18 ` kernel test robot

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=202110211304.4OdQcHLx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=jmaxwell37@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.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

all inboxes | Powered by JetHome®