* [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)
@ 2026-05-12 10:48 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-05-12 10:48 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
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
^ permalink raw reply [flat|nested] 2+ messages in thread* [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)
@ 2026-05-15 3:15 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-05-15 3:15 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
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: 7 days ago
:::::: commit date: 4 months ago
config: sparc-randconfig-r073-20260508 (https://download.01.org/0day-ci/archive/20260515/202605151138.fvPdeQXF-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.4.0
smatch: v0.5.0-9185-gbcc58b9c
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/202605151138.fvPdeQXF-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
db69e9b838c39f4 Gerd Rausch 2026-01-21 107
db69e9b838c39f4 Gerd Rausch 2026-01-21 108 int rds_tcp_accept_one(struct rds_tcp_net *rtn)
70041088e3b9766 Andy Grover 2009-08-21 109 {
db69e9b838c39f4 Gerd Rausch 2026-01-21 110 struct socket *listen_sock = rtn->rds_tcp_listen_sock;
70041088e3b9766 Andy Grover 2009-08-21 111 struct socket *new_sock = NULL;
70041088e3b9766 Andy Grover 2009-08-21 112 struct rds_connection *conn;
70041088e3b9766 Andy Grover 2009-08-21 113 int ret;
70041088e3b9766 Andy Grover 2009-08-21 114 struct inet_sock *inet;
bd7c5f983f3185b Sowmini Varadhan 2016-05-02 115 struct rds_tcp_connection *rs_tcp = NULL;
bd7c5f983f3185b Sowmini Varadhan 2016-05-02 116 int conn_state;
ea3b1ea53930879 Sowmini Varadhan 2016-06-30 117 struct rds_conn_path *cp;
1e2b44e78eead7b Ka-Cheong Poon 2018-07-23 118 struct in6_addr *my_addr, *peer_addr;
e65d4d96334e3ff Ka-Cheong Poon 2018-07-30 119 #if !IS_ENABLED(CONFIG_IPV6)
e65d4d96334e3ff Ka-Cheong Poon 2018-07-30 120 struct in6_addr saddr, daddr;
e65d4d96334e3ff Ka-Cheong Poon 2018-07-30 121 #endif
e65d4d96334e3ff Ka-Cheong Poon 2018-07-30 122 int dev_if = 0;
70041088e3b9766 Andy Grover 2009-08-21 123
db69e9b838c39f4 Gerd Rausch 2026-01-21 124 if (!listen_sock) /* module unload or netns delete in progress */
37e14f4fe2991f6 Sowmini Varadhan 2016-05-18 125 return -ENETUNREACH;
37e14f4fe2991f6 Sowmini Varadhan 2016-05-18 126
db69e9b838c39f4 Gerd Rausch 2026-01-21 127 mutex_lock(&rtn->rds_tcp_accept_lock);
db69e9b838c39f4 Gerd Rausch 2026-01-21 128 new_sock = rtn->rds_tcp_accepted_sock;
db69e9b838c39f4 Gerd Rausch 2026-01-21 129 rtn->rds_tcp_accepted_sock = NULL;
db69e9b838c39f4 Gerd Rausch 2026-01-21 130
db69e9b838c39f4 Gerd Rausch 2026-01-21 @131 if (!new_sock) {
db69e9b838c39f4 Gerd Rausch 2026-01-21 132 ret = kernel_accept(listen_sock, &new_sock, O_NONBLOCK);
70041088e3b9766 Andy Grover 2009-08-21 133 if (ret)
db69e9b838c39f4 Gerd Rausch 2026-01-21 134 goto out;
84eef2b2187ed73 Ka-Cheong Poon 2018-03-01 135
480aeb9639d6a07 Christoph Hellwig 2020-05-28 @136 rds_tcp_keepalive(new_sock);
6997fbd7a3dafa7 Tetsuo Handa 2022-05-05 137 if (!rds_tcp_tune(new_sock)) {
6997fbd7a3dafa7 Tetsuo Handa 2022-05-05 138 ret = -EINVAL;
6997fbd7a3dafa7 Tetsuo Handa 2022-05-05 139 goto out;
6997fbd7a3dafa7 Tetsuo Handa 2022-05-05 140 }
db69e9b838c39f4 Gerd Rausch 2026-01-21 141 }
70041088e3b9766 Andy Grover 2009-08-21 142
70041088e3b9766 Andy Grover 2009-08-21 143 inet = inet_sk(new_sock->sk);
70041088e3b9766 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-15 3:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 10:48 [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
-- strict thread matches above, loose matches on Subject: below --
2026-05-15 3:15 kernel test robot
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.