lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202509112200.zlSc9HkB-lkp@intel.com>
Date: Thu, 11 Sep 2025 22:52:39 +0800
From: kernel test robot <lkp@...el.com>
To: Alessio Attilio <alessio.attilio.dev@...il.com>, aahringo@...hat.com
Cc: oe-kbuild-all@...ts.linux.dev, teigland@...hat.com,
	gfs2@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Alessio Attilio <alessio.attilio@...ineer.com>
Subject: Re: [PATCH] * dlm: improve lock management and concurrency control

Hi Alessio,

kernel test robot noticed the following build warnings:

[auto build test WARNING on teigland-dlm/next]
[also build test WARNING on linus/master v6.17-rc5 next-20250911]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alessio-Attilio/dlm-improve-lock-management-and-concurrency-control/20250911-012449
base:   https://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm.git next
patch link:    https://lore.kernel.org/r/20250910171706.173976-1-alessio.attilio.dev%40gmail.com
patch subject: [PATCH] * dlm: improve lock management and concurrency control
config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20250911/202509112200.zlSc9HkB-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250911/202509112200.zlSc9HkB-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509112200.zlSc9HkB-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/linux/smp.h:12,
                    from include/linux/tracepoint.h:15,
                    from include/trace/events/dlm.h:11,
                    from fs/dlm/lock.c:56:
   fs/dlm/lock.c: In function 'clean_proc_locks':
   fs/dlm/lock.c:6181:39: error: 'safe' undeclared (first use in this function)
    6181 |         list_for_each_entry_safe(lkb, safe, &proc->unlocking, lkb_ownqueue) {
         |                                       ^~~~
   include/linux/list.h:858:17: note: in definition of macro 'list_for_each_entry_safe'
     858 |                 n = list_next_entry(pos, member);                       \
         |                 ^
   fs/dlm/lock.c:6181:39: note: each undeclared identifier is reported only once for each function it appears in
    6181 |         list_for_each_entry_safe(lkb, safe, &proc->unlocking, lkb_ownqueue) {
         |                                       ^~~~
   include/linux/list.h:858:17: note: in definition of macro 'list_for_each_entry_safe'
     858 |                 n = list_next_entry(pos, member);                       \
         |                 ^
   In file included from include/linux/container_of.h:5,
                    from include/linux/list.h:5:
   include/linux/compiler_types.h:507:27: error: expression in static assertion is not an integer
     507 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/container_of.h:21:9: note: in expansion of macro 'static_assert'
      21 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |         ^~~~~~~~~~~~~
   include/linux/container_of.h:21:23: note: in expansion of macro '__same_type'
      21 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                       ^~~~~~~~~~~
   include/linux/list.h:601:9: note: in expansion of macro 'container_of'
     601 |         container_of(ptr, type, member)
         |         ^~~~~~~~~~~~
   include/linux/list.h:645:9: note: in expansion of macro 'list_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |         ^~~~~~~~~~
   include/linux/list.h:860:27: note: in expansion of macro 'list_next_entry'
     860 |              pos = n, n = list_next_entry(n, member))
         |                           ^~~~~~~~~~~~~~~
   fs/dlm/lock.c:6181:9: note: in expansion of macro 'list_for_each_entry_safe'
    6181 |         list_for_each_entry_safe(lkb, safe, &proc->unlocking, lkb_ownqueue) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/list.h:860:21: warning: left-hand operand of comma expression has no effect [-Wunused-value]
     860 |              pos = n, n = list_next_entry(n, member))
         |                     ^
   fs/dlm/lock.c:6181:9: note: in expansion of macro 'list_for_each_entry_safe'
    6181 |         list_for_each_entry_safe(lkb, safe, &proc->unlocking, lkb_ownqueue) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
   fs/dlm/lock.c:6189:34: error: 'cb' undeclared (first use in this function); did you mean 'mb'?
    6189 |         list_for_each_entry_safe(cb, cb_safe, &proc->asts, list) {
         |                                  ^~
   include/linux/list.h:857:14: note: in definition of macro 'list_for_each_entry_safe'
     857 |         for (pos = list_first_entry(head, typeof(*pos), member),        \
         |              ^~~
   include/linux/compiler_types.h:507:27: error: expression in static assertion is not an integer
     507 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/container_of.h:21:9: note: in expansion of macro 'static_assert'
      21 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |         ^~~~~~~~~~~~~
   include/linux/container_of.h:21:23: note: in expansion of macro '__same_type'
      21 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                       ^~~~~~~~~~~
   include/linux/list.h:601:9: note: in expansion of macro 'container_of'
     601 |         container_of(ptr, type, member)
         |         ^~~~~~~~~~~~
   include/linux/list.h:612:9: note: in expansion of macro 'list_entry'
     612 |         list_entry((ptr)->next, type, member)
         |         ^~~~~~~~~~
   include/linux/list.h:857:20: note: in expansion of macro 'list_first_entry'
     857 |         for (pos = list_first_entry(head, typeof(*pos), member),        \
         |                    ^~~~~~~~~~~~~~~~
   fs/dlm/lock.c:6189:9: note: in expansion of macro 'list_for_each_entry_safe'
    6189 |         list_for_each_entry_safe(cb, cb_safe, &proc->asts, list) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
   fs/dlm/lock.c:6189:38: error: 'cb_safe' undeclared (first use in this function)
    6189 |         list_for_each_entry_safe(cb, cb_safe, &proc->asts, list) {
         |                                      ^~~~~~~
   include/linux/list.h:858:17: note: in definition of macro 'list_for_each_entry_safe'
     858 |                 n = list_next_entry(pos, member);                       \
         |                 ^
   include/linux/compiler_types.h:507:27: error: expression in static assertion is not an integer
     507 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/container_of.h:21:9: note: in expansion of macro 'static_assert'
      21 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |         ^~~~~~~~~~~~~
   include/linux/container_of.h:21:23: note: in expansion of macro '__same_type'
      21 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                       ^~~~~~~~~~~
   include/linux/list.h:601:9: note: in expansion of macro 'container_of'
     601 |         container_of(ptr, type, member)
         |         ^~~~~~~~~~~~
   include/linux/list.h:645:9: note: in expansion of macro 'list_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |         ^~~~~~~~~~
   include/linux/list.h:858:21: note: in expansion of macro 'list_next_entry'
     858 |                 n = list_next_entry(pos, member);                       \
         |                     ^~~~~~~~~~~~~~~
   fs/dlm/lock.c:6189:9: note: in expansion of macro 'list_for_each_entry_safe'
    6189 |         list_for_each_entry_safe(cb, cb_safe, &proc->asts, list) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:857:64: warning: left-hand operand of comma expression has no effect [-Wunused-value]
     857 |         for (pos = list_first_entry(head, typeof(*pos), member),        \
         |                                                                ^
   fs/dlm/lock.c:6189:9: note: in expansion of macro 'list_for_each_entry_safe'
    6189 |         list_for_each_entry_safe(cb, cb_safe, &proc->asts, list) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:507:27: error: expression in static assertion is not an integer
     507 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/container_of.h:21:9: note: in expansion of macro 'static_assert'
      21 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |         ^~~~~~~~~~~~~
   include/linux/container_of.h:21:23: note: in expansion of macro '__same_type'
      21 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                       ^~~~~~~~~~~
   include/linux/list.h:601:9: note: in expansion of macro 'container_of'
     601 |         container_of(ptr, type, member)
         |         ^~~~~~~~~~~~
   include/linux/list.h:645:9: note: in expansion of macro 'list_entry'
     645 |         list_entry((pos)->member.next, typeof(*(pos)), member)
         |         ^~~~~~~~~~
   include/linux/list.h:860:27: note: in expansion of macro 'list_next_entry'
     860 |              pos = n, n = list_next_entry(n, member))
         |                           ^~~~~~~~~~~~~~~
   fs/dlm/lock.c:6189:9: note: in expansion of macro 'list_for_each_entry_safe'
    6189 |         list_for_each_entry_safe(cb, cb_safe, &proc->asts, list) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/list.h:860:21: warning: left-hand operand of comma expression has no effect [-Wunused-value]
     860 |              pos = n, n = list_next_entry(n, member))
         |                     ^
   fs/dlm/lock.c:6189:9: note: in expansion of macro 'list_for_each_entry_safe'
    6189 |         list_for_each_entry_safe(cb, cb_safe, &proc->asts, list) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
   fs/dlm/lock.c: At top level:
>> fs/dlm/lock.c:6149:13: warning: 'clean_proc_locks' defined but not used [-Wunused-function]
    6149 | static void clean_proc_locks(struct dlm_ls *ls, struct dlm_user_proc *proc)
         |             ^~~~~~~~~~~~~~~~


vim +/clean_proc_locks +6149 fs/dlm/lock.c

  6148	
> 6149	static void clean_proc_locks(struct dlm_ls *ls, struct dlm_user_proc *proc)
  6150	{
  6151		struct dlm_lkb *lkb;
  6152	
  6153		dlm_lock_recovery(ls);
  6154	
  6155		while (1) {
  6156			lkb = NULL;
  6157			spin_lock_bh(&proc->locks_spin);
  6158			if (!list_empty(&proc->locks)) {
  6159				lkb = list_entry(proc->locks.next, struct dlm_lkb,
  6160						 lkb_ownqueue);
  6161				list_del_init(&lkb->lkb_ownqueue);
  6162			}
  6163			spin_unlock_bh(&proc->locks_spin);
  6164	
  6165			if (!lkb)
  6166				break;
  6167	
  6168			if (lkb->lkb_exflags & DLM_LKF_PERSISTENT) {
  6169				set_bit(DLM_DFL_ORPHAN_BIT, &lkb->lkb_dflags);
  6170				orphan_proc_lock(ls, lkb);
  6171			} else {
  6172				set_bit(DLM_IFL_DEAD_BIT, &lkb->lkb_iflags);
  6173				unlock_proc_lock(ls, lkb);
  6174			}
  6175	
  6176			dlm_put_lkb(lkb);
  6177		}
  6178	
  6179		spin_lock_bh(&proc->locks_spin);
  6180		/* in-progress unlocks */
  6181		list_for_each_entry_safe(lkb, safe, &proc->unlocking, lkb_ownqueue) {
  6182			list_del_init(&lkb->lkb_ownqueue);
  6183			set_bit(DLM_IFL_DEAD_BIT, &lkb->lkb_iflags);
  6184			dlm_put_lkb(lkb);
  6185		}
  6186		spin_unlock_bh(&proc->locks_spin);
  6187	
  6188		spin_lock_bh(&proc->asts_spin);
  6189		list_for_each_entry_safe(cb, cb_safe, &proc->asts, list) {
  6190			list_del(&cb->list);
  6191			dlm_free_cb(cb);
  6192		}
  6193		spin_unlock_bh(&proc->asts_spin);
  6194	
  6195		dlm_unlock_recovery(ls);
  6196	}
  6197	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ