From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5A4E3A4F2D for ; Wed, 4 Feb 2026 09:25:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770197144; cv=none; b=r7Fgnyjr46nEJwFfd/bASkxNz96cGqTphAZZAVfd4CAGGNA2gn2n544ddb8DkZzRw1gImNY8izd5ohIYcB6RHX17KLjTTOyZ8njzEjnXvI1X2r4PLrq+JmYIWvqvr5op+IhV61gQfpXrIgOXPQkndcxJgCKAnLObTObL8SQcMWk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770197144; c=relaxed/simple; bh=sfB6SZZUsG/4pFop9nPbJXi+ya9yBuo72RFii+WdciY=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=SFeR1omyx0vRvJHt6vusRfT171UvAy1Jvpw0tGQ2GlOPs7xG2tUPyQWP+M7im25WsN49ckdF70rCLvqgHpxbYSg3MSmcYPRtb7IiaJ/KEm2QRgEqFD7QkkLzUcgkaJn4vw93aOmkvBeJ9F+bFoEOSDRyytCfPHTq1y08jWzZxu0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=BjPvuF5u; arc=none smtp.client-ip=209.85.128.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BjPvuF5u" Received: by mail-wm1-f65.google.com with SMTP id 5b1f17b1804b1-48069a48629so67926545e9.0 for ; Wed, 04 Feb 2026 01:25:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770197142; x=1770801942; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=Q/Dwz60eN8t814Eadtkgm3VGTpt3HNP1bBhGTKSnFdw=; b=BjPvuF5uNu9LvE67BPtNeUs8NADe4j2FDAGEmy9fLnRoT/h9uzzsWxboD72t2X6De6 A9E1wZT+eMGiimpFjoBMGP69SCe7n78jh+lqCFXnZasAnUMnaaDlnPA9+r8tqbCHB5tp i1OtmsLKKc0otjCKQt0Uu9g6YsXek5+Z3EjXro2TjB7qq2Mo46hj6xBSy38LojPQxODL wiWTOXPTlsQFt0If1tWtuMqe5Rf66LasRJZ3CdZEnorxOvDzpaau/qtEHLfGKN7C72kP pFCSA69m8tAEiTPIjM6mOZ9du24g+8HC/4VksbgFJVW4i5BYmZMFRFLka3ZcpS7bInWv tpGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770197142; x=1770801942; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Q/Dwz60eN8t814Eadtkgm3VGTpt3HNP1bBhGTKSnFdw=; b=ekRV8VLIrEzbKo82mqXcnkc8fHOCmNi1KhUrGvmkY+lwtSNgmwq7HFPnVqcC56wwmf nvDLmwdTR+PeY2mRF5Bc+JLmMBNVwIWwI9a9tZaY3JrjSCeDRK9M6v76+32cHKNvBpYj tKr+zi0yr9SVevRM9JLPKH+JT2iP1vWJhd3wkGA9FUDWoGt6cojNq/bU68/hRZrjNfgL xL4IhZru1iLP9T25XtEkn1fpHNLP83pTtJxVb3FmpVa3HJ5UJMv8IywJwqgHqOprfLyZ uVmaMVex4PN2waR4ckSKZPdfp6ntcao4bEQa7N6GMJBldPZyPtSWRIUu4IIrAYcgSVRy bgQA== X-Forwarded-Encrypted: i=1; AJvYcCUUpz5YMwOy5t1493xuRWobIKcFKyEvz3eQrudg3u/M//JQuxx8ZsItO7jKz4pTCCQ+GU+CKBICoZIZOD0=@vger.kernel.org X-Gm-Message-State: AOJu0YwAotw2XNLIsHqR4/GZhklqHe41a5+TqKH0FtO5RjhOZ5uOkvh4 YM9M6FViosTBbCiJ0Ahf6aXl4Nxs525FPkrW3CAx/LeLAQfHfPsxTECrxm8OQ5LgmzA= X-Gm-Gg: AZuq6aIfOJssSUMhqix8rF/v2fk9MbfaHFZGgOUMtyfBQNCyYRfo37LXtHyqqig2h/9 HPN0OMXKqF4WLEx1U79AgkZPkeg3/CXXBjY48Hnrtqypxt034M16Yq+E36UI1u6IrCFrYYFp1K3 z/gXvwX2Fd6qu0UGWuR9G60OZu5WVfz+vJPUiHB/wLLMgRlluIQeJZXDjzTdCpNtFx+tOsxSUTX ygVjO2FJR+FWOrt225E79VTrR4n7FFGTdiNaswOojATGraKALl0vhw7nySG5bszG/Mjwyiuzhkk 1pkntxv8HBksggBA7K3mITY65r3MPYUnUz/gBwrGbSSCD+iaul4ZuaoPrINNoVwvO9Y361la1qE 49YnGgSi75cBj68NQZ5oK/RNHT99Bw1OHub3z+lWy97nibbOBD8m0kiJgVHiUqjDzN0HAVjLZmV 1pXV2gttjMJkxDC67s X-Received: by 2002:a05:600c:4513:b0:47d:6856:9bd9 with SMTP id 5b1f17b1804b1-4830e97ae1emr30835985e9.23.1770197141948; Wed, 04 Feb 2026 01:25:41 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4830fe7cb9csm19174065e9.8.2026.02.04.01.25.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Feb 2026 01:25:41 -0800 (PST) Date: Wed, 4 Feb 2026 12:25:38 +0300 From: Dan Carpenter To: oe-kbuild@lists.linux.dev, YiPeng Chai Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Alex Deucher , Tao Zhou , Hawking Zhang Subject: drivers/gpu/drm/amd/amdgpu/../ras/rascore/ras_core.c:511 ras_core_get_utc_second_timestamp() error: we previously assumed 'ras_core' could be null (see line 507) Message-ID: <202602031229.RI8PLyjl-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 6bd9ed02871f22beb0e50690b0c3caf457104f7c commit: ace232eff50e8c898103c56b3b5303e776616274 drm/amdgpu: Add ras module files into amdgpu config: s390-randconfig-r072-20260202 (https://download.01.org/0day-ci/archive/20260203/202602031229.RI8PLyjl-lkp@intel.com/config) compiler: s390-linux-gcc (GCC) 10.5.0 smatch version: v0.5.0-8994-gd50c5a4c 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 | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202602031229.RI8PLyjl-lkp@intel.com/ smatch warnings: drivers/gpu/drm/amd/amdgpu/../ras/rascore/ras_core.c:511 ras_core_get_utc_second_timestamp() error: we previously assumed 'ras_core' could be null (see line 507) drivers/gpu/drm/amd/amdgpu/../ras/rascore/ras_core.c:530 ras_core_ras_interrupt_detected() error: we previously assumed 'ras_core' could be null (see line 526) drivers/gpu/drm/amd/amdgpu/../ras/rascore/ras_umc.c:210 ras_umc_log_pending_bad_bank() warn: variable dereferenced before check 'ecc_node' (see line 208) vim +/ras_core +511 drivers/gpu/drm/amd/amdgpu/../ras/rascore/ras_core.c 13c91b5b4378b5 YiPeng Chai 2025-03-17 505 uint64_t ras_core_get_utc_second_timestamp(struct ras_core_context *ras_core) 13c91b5b4378b5 YiPeng Chai 2025-03-17 506 { 13c91b5b4378b5 YiPeng Chai 2025-03-17 @507 if (ras_core && ras_core->sys_fn && ^^^^^^^^ If ras_core is NULL 13c91b5b4378b5 YiPeng Chai 2025-03-17 508 ras_core->sys_fn->get_utc_second_timestamp) 13c91b5b4378b5 YiPeng Chai 2025-03-17 509 return ras_core->sys_fn->get_utc_second_timestamp(ras_core); 13c91b5b4378b5 YiPeng Chai 2025-03-17 510 13c91b5b4378b5 YiPeng Chai 2025-03-17 @511 RAS_DEV_ERR(ras_core->dev, "Failed to get system timestamp!\n"); ^^^^^^^^^^^^^ Then this will crash. 13c91b5b4378b5 YiPeng Chai 2025-03-17 512 return 0; 13c91b5b4378b5 YiPeng Chai 2025-03-17 513 } 13c91b5b4378b5 YiPeng Chai 2025-03-17 514 13c91b5b4378b5 YiPeng Chai 2025-03-17 515 int ras_core_translate_soc_pa_and_bank(struct ras_core_context *ras_core, 13c91b5b4378b5 YiPeng Chai 2025-03-17 516 uint64_t *soc_pa, struct umc_bank_addr *bank_addr, bool bank_to_pa) 13c91b5b4378b5 YiPeng Chai 2025-03-17 517 { 13c91b5b4378b5 YiPeng Chai 2025-03-17 518 if (!ras_core || !soc_pa || !bank_addr) 13c91b5b4378b5 YiPeng Chai 2025-03-17 519 return -EINVAL; 13c91b5b4378b5 YiPeng Chai 2025-03-17 520 13c91b5b4378b5 YiPeng Chai 2025-03-17 521 return ras_umc_translate_soc_pa_and_bank(ras_core, soc_pa, bank_addr, bank_to_pa); 13c91b5b4378b5 YiPeng Chai 2025-03-17 522 } 13c91b5b4378b5 YiPeng Chai 2025-03-17 523 13c91b5b4378b5 YiPeng Chai 2025-03-17 524 bool ras_core_ras_interrupt_detected(struct ras_core_context *ras_core) 13c91b5b4378b5 YiPeng Chai 2025-03-17 525 { 13c91b5b4378b5 YiPeng Chai 2025-03-17 @526 if (ras_core && ras_core->sys_fn && 13c91b5b4378b5 YiPeng Chai 2025-03-17 527 ras_core->sys_fn->detect_ras_interrupt) 13c91b5b4378b5 YiPeng Chai 2025-03-17 528 return ras_core->sys_fn->detect_ras_interrupt(ras_core); 13c91b5b4378b5 YiPeng Chai 2025-03-17 529 13c91b5b4378b5 YiPeng Chai 2025-03-17 @530 RAS_DEV_ERR(ras_core->dev, "Failed to detect ras interrupt!\n"); ^^^^^^^^^^^^^ Same. 13c91b5b4378b5 YiPeng Chai 2025-03-17 531 return false; 13c91b5b4378b5 YiPeng Chai 2025-03-17 532 } -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki