All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vincent Donnefort <vdonnefort@google.com>,
	rostedt@goodmis.org, mhiramat@kernel.org,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	mathieu.desnoyers@efficios.com, kernel-team@android.com,
	Vincent Donnefort <vdonnefort@google.com>
Subject: Re: [PATCH v17 2/6] ring-buffer: Introducing ring-buffer mapping functions
Date: Wed, 14 Feb 2024 09:23:30 +0800	[thread overview]
Message-ID: <202402140910.TFs9k0YR-lkp@intel.com> (raw)
In-Reply-To: <20240213114945.3528801-3-vdonnefort@google.com>

Hi Vincent,

kernel test robot noticed the following build errors:

[auto build test ERROR on ca185770db914869ff9fe773bac5e0e5e4165b83]

url:    https://github.com/intel-lab-lkp/linux/commits/Vincent-Donnefort/ring-buffer-Zero-ring-buffer-sub-buffers/20240213-195302
base:   ca185770db914869ff9fe773bac5e0e5e4165b83
patch link:    https://lore.kernel.org/r/20240213114945.3528801-3-vdonnefort%40google.com
patch subject: [PATCH v17 2/6] ring-buffer: Introducing ring-buffer mapping functions
config: i386-buildonly-randconfig-001-20240214 (https://download.01.org/0day-ci/archive/20240214/202402140910.TFs9k0YR-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240214/202402140910.TFs9k0YR-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/202402140910.TFs9k0YR-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/trace/ring_buffer.c:6185:2: error: member reference type 'struct mutex' is not a pointer; did you mean to use '.'?
    6185 |         lockdep_assert_held(cpu_buffer->mapping_lock);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/lockdep.h:267:17: note: expanded from macro 'lockdep_assert_held'
     267 |         lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
         |         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/lockdep.h:234:52: note: expanded from macro 'lockdep_is_held'
     234 | #define lockdep_is_held(lock)           lock_is_held(&(lock)->dep_map)
         |                                                             ^
   include/linux/lockdep.h:261:32: note: expanded from macro 'lockdep_assert'
     261 |         do { WARN_ON(debug_locks && !(cond)); } while (0)
         |              ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
   include/asm-generic/bug.h:123:25: note: expanded from macro 'WARN_ON'
     123 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
>> kernel/trace/ring_buffer.c:6185:2: error: cannot take the address of an rvalue of type 'struct lockdep_map'
    6185 |         lockdep_assert_held(cpu_buffer->mapping_lock);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/lockdep.h:267:17: note: expanded from macro 'lockdep_assert_held'
     267 |         lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
         |         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/lockdep.h:234:45: note: expanded from macro 'lockdep_is_held'
     234 | #define lockdep_is_held(lock)           lock_is_held(&(lock)->dep_map)
         |                                                      ^
   include/linux/lockdep.h:261:32: note: expanded from macro 'lockdep_assert'
     261 |         do { WARN_ON(debug_locks && !(cond)); } while (0)
         |              ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
   include/asm-generic/bug.h:123:25: note: expanded from macro 'WARN_ON'
     123 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   2 errors generated.


vim +6185 kernel/trace/ring_buffer.c

  6174	
  6175	/*
  6176	 * Fast-path for rb_buffer_(un)map(). Called whenever the meta-page doesn't need
  6177	 * to be set-up or torn-down.
  6178	 */
  6179	static int __rb_inc_dec_mapped(struct trace_buffer *buffer,
  6180				       struct ring_buffer_per_cpu *cpu_buffer,
  6181				       bool inc)
  6182	{
  6183		unsigned long flags;
  6184	
> 6185		lockdep_assert_held(cpu_buffer->mapping_lock);
  6186	
  6187		if (inc && cpu_buffer->mapped == UINT_MAX)
  6188			return -EBUSY;
  6189	
  6190		if (WARN_ON(!inc && cpu_buffer->mapped == 0))
  6191			return -EINVAL;
  6192	
  6193		mutex_lock(&buffer->mutex);
  6194		raw_spin_lock_irqsave(&cpu_buffer->reader_lock, flags);
  6195	
  6196		if (inc)
  6197			cpu_buffer->mapped++;
  6198		else
  6199			cpu_buffer->mapped--;
  6200	
  6201		raw_spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags);
  6202		mutex_unlock(&buffer->mutex);
  6203	
  6204		return 0;
  6205	}
  6206	

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

  parent reply	other threads:[~2024-02-14  1:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13 11:49 [PATCH v17 0/6] Introducing trace buffer mapping by user-space Vincent Donnefort
2024-02-13 11:49 ` [PATCH v17 1/6] ring-buffer: Zero ring-buffer sub-buffers Vincent Donnefort
2024-02-13 11:49 ` [PATCH v17 2/6] ring-buffer: Introducing ring-buffer mapping functions Vincent Donnefort
2024-02-13 20:53   ` Steven Rostedt
2024-02-13 22:51     ` Steven Rostedt
2024-02-14  1:23   ` kernel test robot [this message]
2024-02-14 10:26   ` kernel test robot
2024-02-13 11:49 ` [PATCH v17 3/6] tracing: Add snapshot refcount Vincent Donnefort
2024-02-19 18:17   ` Steven Rostedt
2024-02-19 18:22     ` Steven Rostedt
2024-02-13 11:49 ` [PATCH v17 4/6] tracing: Allow user-space mapping of the ring-buffer Vincent Donnefort
2024-02-13 11:49 ` [PATCH v17 5/6] Documentation: tracing: Add ring-buffer mapping Vincent Donnefort
2024-02-13 11:49 ` [PATCH v17 6/6] ring-buffer/selftest: Add ring-buffer mapping test Vincent Donnefort

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=202402140910.TFs9k0YR-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rostedt@goodmis.org \
    --cc=vdonnefort@google.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 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.