From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [linux-next:master 8182/13385] net/rds/tcp_listen.c:136 rds_tcp_accept_one() error: we previously assumed 'new_sock' could be null (see line 131)
Date: Tue, 12 May 2026 18:48:44 +0800 [thread overview]
Message-ID: <202605121815.5u1tbtZK-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Gerd Rausch <gerd.rausch@oracle.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Jack Vogel <jack.vogel@oracle.com>
CC: Allison Henderson <allison.henderson@oracle.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e98d21c170b01ddef366f023bbfcf6b31509fa83
commit: db69e9b838c39f4fb17d0547aeb71d55a7f28061 [8182/13385] net/rds: rds_tcp_accept_one ought to not discard messages
:::::: branch date: 4 days ago
:::::: commit date: 4 months ago
config: sparc-randconfig-r073-20260508 (https://download.01.org/0day-ci/archive/20260512/202605121815.5u1tbtZK-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.4.0
smatch: v0.5.0-9065-ge9cc34fd
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202605121815.5u1tbtZK-lkp@intel.com/
smatch warnings:
net/rds/tcp_listen.c:136 rds_tcp_accept_one() error: we previously assumed 'new_sock' could be null (see line 131)
vim +/new_sock +136 net/rds/tcp_listen.c
db69e9b838c39f Gerd Rausch 2026-01-21 107
db69e9b838c39f Gerd Rausch 2026-01-21 108 int rds_tcp_accept_one(struct rds_tcp_net *rtn)
70041088e3b976 Andy Grover 2009-08-21 109 {
db69e9b838c39f Gerd Rausch 2026-01-21 110 struct socket *listen_sock = rtn->rds_tcp_listen_sock;
70041088e3b976 Andy Grover 2009-08-21 111 struct socket *new_sock = NULL;
70041088e3b976 Andy Grover 2009-08-21 112 struct rds_connection *conn;
70041088e3b976 Andy Grover 2009-08-21 113 int ret;
70041088e3b976 Andy Grover 2009-08-21 114 struct inet_sock *inet;
bd7c5f983f3185 Sowmini Varadhan 2016-05-02 115 struct rds_tcp_connection *rs_tcp = NULL;
bd7c5f983f3185 Sowmini Varadhan 2016-05-02 116 int conn_state;
ea3b1ea5393087 Sowmini Varadhan 2016-06-30 117 struct rds_conn_path *cp;
1e2b44e78eead7 Ka-Cheong Poon 2018-07-23 118 struct in6_addr *my_addr, *peer_addr;
e65d4d96334e3f Ka-Cheong Poon 2018-07-30 119 #if !IS_ENABLED(CONFIG_IPV6)
e65d4d96334e3f Ka-Cheong Poon 2018-07-30 120 struct in6_addr saddr, daddr;
e65d4d96334e3f Ka-Cheong Poon 2018-07-30 121 #endif
e65d4d96334e3f Ka-Cheong Poon 2018-07-30 122 int dev_if = 0;
70041088e3b976 Andy Grover 2009-08-21 123
db69e9b838c39f Gerd Rausch 2026-01-21 124 if (!listen_sock) /* module unload or netns delete in progress */
37e14f4fe2991f Sowmini Varadhan 2016-05-18 125 return -ENETUNREACH;
37e14f4fe2991f Sowmini Varadhan 2016-05-18 126
db69e9b838c39f Gerd Rausch 2026-01-21 127 mutex_lock(&rtn->rds_tcp_accept_lock);
db69e9b838c39f Gerd Rausch 2026-01-21 128 new_sock = rtn->rds_tcp_accepted_sock;
db69e9b838c39f Gerd Rausch 2026-01-21 129 rtn->rds_tcp_accepted_sock = NULL;
db69e9b838c39f Gerd Rausch 2026-01-21 130
db69e9b838c39f Gerd Rausch 2026-01-21 @131 if (!new_sock) {
db69e9b838c39f Gerd Rausch 2026-01-21 132 ret = kernel_accept(listen_sock, &new_sock, O_NONBLOCK);
70041088e3b976 Andy Grover 2009-08-21 133 if (ret)
db69e9b838c39f Gerd Rausch 2026-01-21 134 goto out;
84eef2b2187ed7 Ka-Cheong Poon 2018-03-01 135
480aeb9639d6a0 Christoph Hellwig 2020-05-28 @136 rds_tcp_keepalive(new_sock);
6997fbd7a3dafa Tetsuo Handa 2022-05-05 137 if (!rds_tcp_tune(new_sock)) {
6997fbd7a3dafa Tetsuo Handa 2022-05-05 138 ret = -EINVAL;
6997fbd7a3dafa Tetsuo Handa 2022-05-05 139 goto out;
6997fbd7a3dafa Tetsuo Handa 2022-05-05 140 }
db69e9b838c39f Gerd Rausch 2026-01-21 141 }
70041088e3b976 Andy Grover 2009-08-21 142
70041088e3b976 Andy Grover 2009-08-21 143 inet = inet_sk(new_sock->sk);
70041088e3b976 Andy Grover 2009-08-21 144
:::::: The code at line 136 was first introduced by commit
:::::: 480aeb9639d6a077c611b303a22f9b1e5937d081 tcp: add tcp_sock_set_keepcnt
:::::: TO: Christoph Hellwig <hch@lst.de>
:::::: CC: David S. Miller <davem@davemloft.net>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-05-12 10:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 10:48 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-05-15 3:15 [linux-next:master 8182/13385] net/rds/tcp_listen.c:136 rds_tcp_accept_one() error: we previously assumed 'new_sock' could be null (see line 131) 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=202605121815.5u1tbtZK-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.