mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <yujie.liu@intel.com>
To: Jon Maxwell <jmaxwell37@gmail.com>
Cc: <kbuild-all@lists.01.org>, Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	<yoshfuji@linux-ipv6.org>, David Ahern <dsahern@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <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: Mon, 25 Oct 2021 01:18:53 +0800	[thread overview]
Message-ID: <71d8aec2-ef42-76a9-55e3-024162d2309f@intel.com> (raw)
In-Reply-To: <202110221513.52ubgVaN-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2731 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-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@intel.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

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

       reply	other threads:[~2021-10-24 17:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202110221513.52ubgVaN-lkp@intel.com>
2021-10-24 17:18 ` kernel test robot [this message]
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

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=71d8aec2-ef42-76a9-55e3-024162d2309f@intel.com \
    --to=yujie.liu@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=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®