From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CE8434B1B0 for ; Fri, 16 Jan 2026 17:22:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768584143; cv=none; b=JAQ04LIBUZa5SAxWmYWNGnORBFNJ92pcV1Sbw+ZY+kk10EEvVuIupFpEZYtF7LcEQH/5t/AxwixlaI6/yZpxuIfEop+WVskkcAWdMTIlZ6wnfNaX9hgMEz80nKrbiPdoa8jM9f60YlCjnNVDmqOBuapT0jY1pwr9vejWjPO91ow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768584143; c=relaxed/simple; bh=AxjSuug8V4i2nIB3xI0G01BjVe8ONsPOxkX1G1Vdcws=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=dr/QtNt92YVxRtXDmIvPnbW/vP7VXAP5oCgSxoSCj9MjO3fHL6m4Qm0Vkrp8JT4Keyd7Cp7VGl2IBLbM4RGuEP5pbrZqKXtAhbC9abQq0oQXgGsuuIBufxyJ1RdxPpnm2R1kTijc8tGNZvdl5+ftCpr7YGvjodWkwMMjrahHniY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=eSFg4bY/; arc=none smtp.client-ip=198.175.65.9 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.b="eSFg4bY/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1768584140; x=1800120140; h=date:from:to:cc:subject:message-id:mime-version; bh=AxjSuug8V4i2nIB3xI0G01BjVe8ONsPOxkX1G1Vdcws=; b=eSFg4bY/dhlYogqIAIzfJhVlhVliGh6SI1xtFXGSsfzckdFCvUZCOBL7 EYdND+U72/rWaSEOPe/6gqOFARSgqVqoR5CTevZMHBOBLOh5VA3hUsISo HBoZ3NqB7WXMsLWvuI9pQGUDFbor3hzNpVypWuczgGnipzkHINAOjghad 1vhE+nw+I4SOe0I7GgP0Exi3ZwNtTGQc59W4GOP6w9p2D+Xx5P9rZXRwb cqikWM9PoeMAkCyuSvx7wTf053lPi4+sMf3K9MIn/m8h5BuE7AEPTsCYp ncdJcO0z6Lp9WgIK9venHxnRB4ARWNPRJhn1NgAvsqfwlMB7RrE7d3XWQ A==; X-CSE-ConnectionGUID: 1tyuchyOSs+QrsXkSBMeUA== X-CSE-MsgGUID: 6lpf+TgrRXOieiv/3sWR2w== X-IronPort-AV: E=McAfee;i="6800,10657,11673"; a="92565552" X-IronPort-AV: E=Sophos;i="6.21,231,1763452800"; d="scan'208";a="92565552" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2026 09:22:14 -0800 X-CSE-ConnectionGUID: VFQrzmwJQ12qHuiIZmHoaQ== X-CSE-MsgGUID: S0D1NU0PSf+RmvMxgtzeWw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,231,1763452800"; d="scan'208";a="236562167" Received: from lkp-server01.sh.intel.com (HELO 765f4a05e27f) ([10.239.97.150]) by fmviesa001.fm.intel.com with ESMTP; 16 Jan 2026 09:22:12 -0800 Received: from kbuild by 765f4a05e27f with local (Exim 4.98.2) (envelope-from ) id 1vgnWU-00000000L5T-14Tq; Fri, 16 Jan 2026 17:22:10 +0000 Date: Sat, 17 Jan 2026 01:22:06 +0800 From: kernel test robot To: Tvrtko Ursulin Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, "Christian =?utf-8?Q?K=C3=B6nig"?= Subject: drivers/dma-buf/dma-fence.c:1112:51: sparse: sparse: incorrect type in return expression (different address spaces) Message-ID: <202601170112.FVBMyjX0-lkp@intel.com> User-Agent: s-nail v14.9.25 Precedence: bulk X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 983d014aafb14ee5e4915465bf8948e8f3a723b5 commit: 506aa8b02a8d6898c64cc095d233fbae1cef8b8a dma-fence: Add safe access helpers and document the rules date: 7 months ago config: i386-randconfig-063-20260116 (https://download.01.org/0day-ci/archive/20260117/202601170112.FVBMyjX0-lkp@intel.com/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260117/202601170112.FVBMyjX0-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/202601170112.FVBMyjX0-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/dma-buf/dma-fence.c:1112:51: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected char const [noderef] __rcu * @@ got char const * @@ drivers/dma-buf/dma-fence.c:1112:51: sparse: expected char const [noderef] __rcu * drivers/dma-buf/dma-fence.c:1112:51: sparse: got char const * drivers/dma-buf/dma-fence.c:1114:24: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected char const [noderef] __rcu * @@ got char * @@ drivers/dma-buf/dma-fence.c:1114:24: sparse: expected char const [noderef] __rcu * drivers/dma-buf/dma-fence.c:1114:24: sparse: got char * drivers/dma-buf/dma-fence.c:1144:51: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected char const [noderef] __rcu * @@ got char const * @@ drivers/dma-buf/dma-fence.c:1144:51: sparse: expected char const [noderef] __rcu * drivers/dma-buf/dma-fence.c:1144:51: sparse: got char const * drivers/dma-buf/dma-fence.c:1146:24: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected char const [noderef] __rcu * @@ got char * @@ drivers/dma-buf/dma-fence.c:1146:24: sparse: expected char const [noderef] __rcu * drivers/dma-buf/dma-fence.c:1146:24: sparse: got char * drivers/dma-buf/dma-fence.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/dma_fence.h): include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void const *driver_ptr_ @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected void const *driver_ptr_ include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void const *timeline_ptr_ @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected void const *timeline_ptr_ include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void const *driver_ptr_ @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected void const *driver_ptr_ include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected char const *str include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void const *timeline_ptr_ @@ got char const [noderef] __rcu * @@ include/trace/events/dma_fence.h:12:1: sparse: expected void const *timeline_ptr_ include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu * vim +1112 drivers/dma-buf/dma-fence.c 1085 1086 /** 1087 * dma_fence_driver_name - Access the driver name 1088 * @fence: the fence to query 1089 * 1090 * Returns a driver name backing the dma-fence implementation. 1091 * 1092 * IMPORTANT CONSIDERATION: 1093 * Dma-fence contract stipulates that access to driver provided data (data not 1094 * directly embedded into the object itself), such as the &dma_fence.lock and 1095 * memory potentially accessed by the &dma_fence.ops functions, is forbidden 1096 * after the fence has been signalled. Drivers are allowed to free that data, 1097 * and some do. 1098 * 1099 * To allow safe access drivers are mandated to guarantee a RCU grace period 1100 * between signalling the fence and freeing said data. 1101 * 1102 * As such access to the driver name is only valid inside a RCU locked section. 1103 * The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded 1104 * by the &rcu_read_lock and &rcu_read_unlock pair. 1105 */ 1106 const char __rcu *dma_fence_driver_name(struct dma_fence *fence) 1107 { 1108 RCU_LOCKDEP_WARN(!rcu_read_lock_held(), 1109 "RCU protection is required for safe access to returned string"); 1110 1111 if (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) > 1112 return fence->ops->get_driver_name(fence); 1113 else 1114 return "detached-driver"; 1115 } 1116 EXPORT_SYMBOL(dma_fence_driver_name); 1117 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki