From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.19 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796464565; b=qnJyZTaqRqY3hFOFE85jJRlwXgFbuY9RWjrzRTDUtEW7jaXsR4/tgX+4cG+fNsN1dVib fkWhA9fesf1pYPearwLVQgOHX9L+bs62SsdtSmRY8zS/Xkn7WP6VcMguX/AfPO8Cfdp0j hSGxwPQOEH6PVYBTPsWTix5kuONBrmIwWjEHVMu8Yn+8jhtkJoA/LDbBHq2wy397bvmfp EFuyNW+2uO8sUTQVrm8J8UBUnC8P8jic7xjBb8gV9nh0o8AI/Dup+55aKOCjI2RyMGMF1 eMS+AQ3kAxH1Og3ejRpRZo4Hz596fcAmFhF3bkJUrs9XgENxyeptTZJxyh6ZncFAqWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796464565; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=DdnPVEjeCGWcUghFFcWfESJtjMwzOtQQf+C712gzy9Y=; b=xiWhgLEOrG5J/ni8rKdKmyrAM4DbPpWj/7qmAv6WWRDsQsFxrPul3ZCPS55VdZzWP+0t FUwyXoinjn8RPnGVD9dBRwstoq2OsUcNjjAawMBePIRLFhzX2AUuepZhPtvXLkKuB7y/h fUZi0EDtO5JIFytF9dsYKvY8D8TGN/3Fs4EiQYRMl67iwOT2A3FXo6jG7bl496tf50EQa uPoGFVA/NtIuLRlWEr8Tbh3VVgjEepCKPltmQzPie4fqS/7Tvy0u2uGtPTI7VnVSsk4p0 L4sHAZctU/oVhJPo/n7SnG9UzsYr5qz9vfRNpyRL0qwrcAMx8qrYo8/tyI8A82okFuw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=ZZGs8bXA; arc=none smtp.remote-ip=192.198.163.19 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C89EE60A2604; Sat, 5 Dec 2026 09:56:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C89EE60A2604 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=ZZGs8bXA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796464565; x=1828000565; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=DdnPVEjeCGWcUghFFcWfESJtjMwzOtQQf+C712gzy9Y=; b=ZZGs8bXAlSaEosujBRYol3mOdNAnQS0zENp+WMY5xb+/QhhTfcSC5JsW r5g7qaSlj/koUJ5cBVjoI04Fvn+Vrklg9lcu2fHlpqSymjcdL6rrKzcM0 wpk4YtHLrOQcPGgve0cEkgdTDePCbY85wahY4gEiP8zWLWGXtOtR6x4tB pNvdHdcGWPDMnxUshKdzxMBNcjAnyKQiYuZ0tGqfgGqmqD88lz++9fbzD ogFjAz3l4NU/hrmv2aZxsAr+Hx5KLJRC7n8QxLsrdYJEc62PgD/ym/c/P bSHcuooq8Caz55Wc+8t9piduCsEXbD06fekZigj0bMfpVhv2uaV7UwqNE Q==; X-CSE-ConnectionGUID: EUngwn+cQiqbTeWjWomFzw== X-CSE-MsgGUID: puyKD4JhSD2RiOhGToc2wg== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="5457099" X-IronPort-AV: E=Sophos;i="6.29,80,1794902400"; d="scan'208";a="5457099" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2026 01:56:04 -0800 X-CSE-ConnectionGUID: tcXZGLFlSsm/EgFf+aJx2w== X-CSE-MsgGUID: SW/WOQ+PRFKScRfQbFcL4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,80,1794902400"; d="scan'208";a="14169156" Received: from lkp-server01.sh.intel.com (HELO 0caa9d2d175c) ([10.239.97.150]) by orviesa006.jf.intel.com with ESMTP; 05 Dec 2026 01:56:00 -0800 Received: from kbuild by 0caa9d2d175c with local (Exim 4.98.2) (envelope-from ) id 1xZmUn-00000001m1y-07IL; Sat, 05 Dec 2026 09:55:57 +0000 Date: Sat, 5 Dec 2026 17:55:02 +0800 From: kernel test robot To: Ziwei Dai , rcu@vger.kernel.org, linux-kernel@vger.kernel.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, "Paul E . McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Uladzislau Rezki , Steven Rostedt , Mathieu Desnoyers , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Lai Jiangshan , Zqiang , lina.yang@unisoc.com Subject: Re: [PATCH] rcu: Stop re-initializing ->boost_mtx on every boost cycle Message-ID: <20261204223109.UDO9Isj1-lkp@intel.com> References: <20261204100830.226336-1-ziwei.dai@unisoc.com> X-Mailing-List: llvm@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261204100830.226336-1-ziwei.dai@unisoc.com> Hi Ziwei, kernel test robot noticed the following build warnings: [auto build test WARNING on tip/locking/core] [also build test WARNING on linus/master v7.4-rc5 next-20261203] [cannot apply to rcu/rcu/dev] [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/Ziwei-Dai/rcu-Stop-re-initializing-boost_mtx-on-every-boost-cycle/20261204-180830 base: tip/locking/core patch link: https://lore.kernel.org/r/20261204100830.226336-1-ziwei.dai%40unisoc.com patch subject: [PATCH] rcu: Stop re-initializing ->boost_mtx on every boost cycle config: um-x86_64_defconfig (https://download.01.org/0day-ci/archive/20261204/20261204223109.UDO9Isj1-lkp@intel.com/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 63b30c97f6082ebf34b31bdd81bb50df7672b67b) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261204/20261204223109.UDO9Isj1-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 | Closes: https://lore.kernel.org/oe-kbuild-all/20261204223109.UDO9Isj1-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/locking/rtmutex_api.c:329:2: warning: calling function 'rt_mutex_set_owner' requires holding raw_spinlock 'lock->wait_lock' exclusively [-Wthread-safety-analysis] 329 | rt_mutex_set_owner(lock, proxy_owner); | ^ 1 warning generated. vim +329 kernel/locking/rtmutex_api.c 296 297 /** 298 * rt_mutex_boost_set_owner - make an initialized rt_mutex appear to be held 299 by @proxy_owner 300 * @lock: the rt_mutex, which must have been initialized already 301 * @proxy_owner: the task to set as owner 302 * 303 * No locking. Caller has to do serializing itself. 304 * 305 * Counterpart of rt_mutex_init_proxy_locked() for RCU priority boosting, 306 * which reuses a single, permanently embedded rt_mutex 307 * (rcu_node::boost_mtx) for every boost cycle. This performs exactly the 308 * same owner assignment, but deliberately does *not* re-initialize @lock 309 * and therefore does not rewrite lock->wait_lock. 310 * 311 * Re-initializing ->wait_lock is not possible once the mutex is in use. 312 * The task which was boosted in the previous cycle releases ->boost_mtx 313 * via rt_mutex_futex_unlock(), and it does so without holding the rcu_node 314 * lock. The ->owner = NULL store in that path happens while ->wait_lock 315 * is held, so the fast path of rt_mutex_lock() can already succeed at 316 * that point. Rewriting ->wait_lock from the boost kthread in this 317 * window lands on a spinlock which the other CPU still holds, which 318 * corrupts the lock word (on ARM32 ticket spinlocks the previous holder 319 * then trips "BUG: spinlock already unlocked") or, worse, lets two CPUs 320 * run inside the wait_lock protected section at the same time. 321 * 322 * Callers must initialize @lock once, up front, and use this function for 323 * every subsequent ownership transfer. @lock must be free and have no 324 * waiters queued when this is called. 325 */ 326 void __sched rt_mutex_boost_set_owner(struct rt_mutex_base *lock, 327 struct task_struct *proxy_owner) 328 { > 329 rt_mutex_set_owner(lock, proxy_owner); 330 } 331 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki