From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH net-next 4/9] l2tp: add tunnel/session get_next helpers
Date: Sun, 11 Aug 2024 14:40:56 +0800 [thread overview]
Message-ID: <202408111407.HtON8jqa-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <4067ff5019040bf8ee2bd3c06db9e3d27ca39ded.1722856576.git.jchapman@katalix.com>
References: <4067ff5019040bf8ee2bd3c06db9e3d27ca39ded.1722856576.git.jchapman@katalix.com>
TO: James Chapman <jchapman@katalix.com>
Hi James,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/James-Chapman/documentation-networking-update-l2tp-docs/20240805-194031
base: net-next/main
patch link: https://lore.kernel.org/r/4067ff5019040bf8ee2bd3c06db9e3d27ca39ded.1722856576.git.jchapman%40katalix.com
patch subject: [PATCH net-next 4/9] l2tp: add tunnel/session get_next helpers
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: microblaze-randconfig-r073-20240810 (https://download.01.org/0day-ci/archive/20240811/202408111407.HtON8jqa-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 14.1.0
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/202408111407.HtON8jqa-lkp@intel.com/
New smatch warnings:
net/l2tp/l2tp_core.c:400 l2tp_v2_session_get_next() error: we previously assumed 'tunnel' could be null (see line 393)
Old smatch warnings:
arch/microblaze/include/asm/thread_info.h:85 current_thread_info() error: uninitialized symbol 'sp'.
net/l2tp/l2tp_core.c:1694 l2tp_tunnel_register() warn: missing error code 'ret'
vim +/tunnel +400 net/l2tp/l2tp_core.c
fd558d186df2c1 James Chapman 2010-04-02 371
1506ceb77b949f James Chapman 2024-08-05 372 static struct l2tp_session *l2tp_v2_session_get_next(const struct net *net, u16 tid, unsigned long *key)
1506ceb77b949f James Chapman 2024-08-05 373 {
1506ceb77b949f James Chapman 2024-08-05 374 struct l2tp_net *pn = l2tp_pernet(net);
1506ceb77b949f James Chapman 2024-08-05 375 struct l2tp_session *session = NULL;
1506ceb77b949f James Chapman 2024-08-05 376
1506ceb77b949f James Chapman 2024-08-05 377 /* Start searching within the range of the tid */
1506ceb77b949f James Chapman 2024-08-05 378 if (*key == 0)
1506ceb77b949f James Chapman 2024-08-05 379 *key = l2tp_v2_session_key(tid, 0);
1506ceb77b949f James Chapman 2024-08-05 380
1506ceb77b949f James Chapman 2024-08-05 381 rcu_read_lock_bh();
1506ceb77b949f James Chapman 2024-08-05 382 again:
1506ceb77b949f James Chapman 2024-08-05 383 session = idr_get_next_ul(&pn->l2tp_v2_session_idr, key);
1506ceb77b949f James Chapman 2024-08-05 384 if (session) {
1506ceb77b949f James Chapman 2024-08-05 385 struct l2tp_tunnel *tunnel = READ_ONCE(session->tunnel);
1506ceb77b949f James Chapman 2024-08-05 386
1506ceb77b949f James Chapman 2024-08-05 387 /* ignore sessions with id 0 as they are internal for pppol2tp */
1506ceb77b949f James Chapman 2024-08-05 388 if (session->session_id == 0) {
1506ceb77b949f James Chapman 2024-08-05 389 (*key)++;
1506ceb77b949f James Chapman 2024-08-05 390 goto again;
1506ceb77b949f James Chapman 2024-08-05 391 }
1506ceb77b949f James Chapman 2024-08-05 392
1506ceb77b949f James Chapman 2024-08-05 @393 if (tunnel && tunnel->tunnel_id == tid &&
1506ceb77b949f James Chapman 2024-08-05 394 refcount_inc_not_zero(&session->ref_count)) {
1506ceb77b949f James Chapman 2024-08-05 395 rcu_read_unlock_bh();
1506ceb77b949f James Chapman 2024-08-05 396 return session;
1506ceb77b949f James Chapman 2024-08-05 397 }
1506ceb77b949f James Chapman 2024-08-05 398
1506ceb77b949f James Chapman 2024-08-05 399 (*key)++;
1506ceb77b949f James Chapman 2024-08-05 @400 if (tunnel->tunnel_id == tid)
1506ceb77b949f James Chapman 2024-08-05 401 goto again;
1506ceb77b949f James Chapman 2024-08-05 402 }
1506ceb77b949f James Chapman 2024-08-05 403 rcu_read_unlock_bh();
1506ceb77b949f James Chapman 2024-08-05 404
1506ceb77b949f James Chapman 2024-08-05 405 return NULL;
1506ceb77b949f James Chapman 2024-08-05 406 }
1506ceb77b949f James Chapman 2024-08-05 407
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-08-11 6:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-11 6:40 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-08-05 11:35 [PATCH net-next 0/9] l2tp: misc improvements James Chapman
2024-08-05 11:35 ` [PATCH net-next 4/9] l2tp: add tunnel/session get_next helpers James Chapman
2024-08-06 14:37 ` Simon Horman
2024-08-11 13:38 ` Dan Carpenter
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=202408111407.HtON8jqa-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.