linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: James Chapman <jchapman@katalix.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Tom Parkin <tparkin@katalix.com>
Subject: [linux-next:master 7577/7797] net/l2tp/l2tp_core.c:1298:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Sat, 22 Jun 2024 07:10:06 +0800	[thread overview]
Message-ID: <202406220754.evK8Hrjw-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   f76698bd9a8ca01d3581236082d786e9a6b72bb7
commit: d18d3f0a24fc4a3513495892ab1a3753628b341b [7577/7797] l2tp: replace hlist with simple list for per-tunnel session list
config: i386-randconfig-062-20240622 (https://download.01.org/0day-ci/archive/20240622/202406220754.evK8Hrjw-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240622/202406220754.evK8Hrjw-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406220754.evK8Hrjw-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> net/l2tp/l2tp_core.c:1298:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct list_head const *list @@     got struct list_head [noderef] __rcu *pos @@
   net/l2tp/l2tp_core.c:1298:9: sparse:     expected struct list_head const *list
   net/l2tp/l2tp_core.c:1298:9: sparse:     got struct list_head [noderef] __rcu *pos
>> net/l2tp/l2tp_core.c:1298:9: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct list_head [noderef] __rcu *pos @@     got struct list_head *next @@
   net/l2tp/l2tp_core.c:1298:9: sparse:     expected struct list_head [noderef] __rcu *pos
   net/l2tp/l2tp_core.c:1298:9: sparse:     got struct list_head *next
>> net/l2tp/l2tp_core.c:1299:27: sparse: sparse: cast removes address space '__rcu' of expression
>> net/l2tp/l2tp_core.c:1298:9: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct list_head [noderef] __rcu *pos @@     got struct list_head *[assigned] tmp @@
   net/l2tp/l2tp_core.c:1298:9: sparse:     expected struct list_head [noderef] __rcu *pos
   net/l2tp/l2tp_core.c:1298:9: sparse:     got struct list_head *[assigned] tmp
   net/l2tp/l2tp_core.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...):
   include/linux/page-flags.h:240:46: sparse: sparse: self-comparison always evaluates to false
   include/linux/page-flags.h:240:46: sparse: sparse: self-comparison always evaluates to false
>> net/l2tp/l2tp_core.c:1298:9: sparse: sparse: dereference of noderef expression
>> net/l2tp/l2tp_core.c:1298:9: sparse: sparse: dereference of noderef expression

vim +1298 net/l2tp/l2tp_core.c

  1287	
  1288	/* When the tunnel is closed, all the attached sessions need to go too.
  1289	 */
  1290	static void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel)
  1291	{
  1292		struct l2tp_session *session;
  1293		struct list_head __rcu *pos;
  1294		struct list_head *tmp;
  1295	
  1296		spin_lock_bh(&tunnel->list_lock);
  1297		tunnel->acpt_newsess = false;
> 1298		list_for_each_safe(pos, tmp, &tunnel->session_list) {
> 1299			session = list_entry(pos, struct l2tp_session, list);
  1300			list_del_init(&session->list);
  1301			spin_unlock_bh(&tunnel->list_lock);
  1302			l2tp_session_delete(session);
  1303			spin_lock_bh(&tunnel->list_lock);
  1304		}
  1305		spin_unlock_bh(&tunnel->list_lock);
  1306	}
  1307	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


                 reply	other threads:[~2024-06-21 23:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202406220754.evK8Hrjw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jchapman@katalix.com \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tparkin@katalix.com \
    /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