Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp104405lqc; Thu, 7 Mar 2024 11:33:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU4wv5lNoSH0ssG2DkkPC5cy+XZGQXknqRIeBGLQhaitzfOWDd4GL+fCmjsUsxboqgRTs0CqBiZsaYYk6VQ3xPgqpSaPe2XdYxEdqhMtg== X-Google-Smtp-Source: AGHT+IGnYp64XtwZXp86IUzIVyG2ySv+i0ttBLy/CW+f4erOSkzc2ziNdiGTygiTa/QoIaj+yN5q X-Received: by 2002:a17:906:1859:b0:a45:af17:6e39 with SMTP id w25-20020a170906185900b00a45af176e39mr2148959eje.1.1709839996378; Thu, 07 Mar 2024 11:33:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709839996; cv=pass; d=google.com; s=arc-20160816; b=Cu5hqfcPnerVMcBVwX2fmHL6OPa4Foc4OygtiGJLwpk30Ufm6z20/ve1UEy8ymjezB F6B5F+sSGyPEOeJAjBz4wcTY58HXgAPzv8KvEAtlGVlP7TnF8K+W6XobxVLKQ7sASvX6 1XrnB51Uhj2Dsfbk6w9bOmDXymLwCRbEpK+efXp9c0XEGdiOR/Z5/Bs4EZwtuNrlvddH /pFeRCcs3WZhgTXYhaw9A4z7rhaajPND5iiwu4VmZ6/T2tSPpAGuMu60xswze1ogC7vh H2tktx5C2ntLOXYIUGf5v9E3xxnmWRSc+AcW0eEndJwFDcudZhnQ3R+gtSP3j2P8RJMf lZjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:date:from :dkim-signature; bh=Y7tFAO5LyLvnL3+HqT9Xq5HyhhJG+8Hgt83qwkFfBN8=; fh=GyIu1PrSIj5/yASfYfpmHyXhWxDuktw2qgv15NSNukg=; b=w4n1NsdFk8xeeQfIrry+KUrJxL5q2sxecPsf3K3zGe3uwfZqcLASxYYMXObl8eAZPZ wRmsq8TxjWUshxWE9wgLdam8keiOIiZnwtRTmIMTcGO0RhzC7uHgGrjl99E2P/W6vWY8 kUI0rGOJ57z4juHggg2MPdlEy1lHcx+TUj47ndz+vGl82x7ukNGwaZNyzPFkbjXaXdeK gfrhtIaBx48DpOnNKfWS4g3OOgyTgQdhJSROaXaHklQaWOCmpvW4WaAnSziKbe3PrXv0 1IB8FKy2Rk0B3DXpe+mCLxPf/9UGfCaD0ndIsXAwjH4cnqIA6w5Xh2s67oocGX8clYtt 1WVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gw2zGA57; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-96113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96113-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gt16-20020a1709072d9000b00a444e66e76bsi7108891ejc.639.2024.03.07.11.33.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 11:33:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gw2zGA57; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-96113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96113-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7B2D91F21437 for ; Thu, 7 Mar 2024 19:33:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04F50137C45; Thu, 7 Mar 2024 19:32:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="gw2zGA57" Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (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 B72D713699B for ; Thu, 7 Mar 2024 19:32:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709839964; cv=none; b=oExceViYTMalxa//fLmxgynYSVtwlOrXGZxegHNmJKMbq/XvbHU8XWs9q3qpoESKxlQK7Md83nSaQ96/vlfK+XOw/2DAccd1ZMD79z62LH79T0HigbNiVcoM4xp5f5u+eRD56j8yZIu/dGbX93/L+PUBB5MRLm7PWZiDeIp+d7M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709839964; c=relaxed/simple; bh=5OZyAdHUAPw3oC7IW6omY8gpyxLtveQWTOhptQtmJ1s=; h=From:Date:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=U/15VWDVON5AWsHiUXNwqzim7LTy6Q4K5vHR+Eo0A4cdpI3b4UpOpiNKlGtmPgPmNeYjROYFXv9fmkYpTgah/Y9bDrMt79IWCvssjQ6hTKwdWdgbNwVd2YDaKoZjng+ACvO4hfVyE68v/tSmLIarK40phOI+UYanZoHg1ZzBpas= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=gw2zGA57; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6e09143c7bdso1063387b3a.3 for ; Thu, 07 Mar 2024 11:32:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1709839962; x=1710444762; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :from:to:cc:subject:date:message-id:reply-to; bh=Y7tFAO5LyLvnL3+HqT9Xq5HyhhJG+8Hgt83qwkFfBN8=; b=gw2zGA57c6SnchTFQMga1rz3QlyMVdFY5Xo/Y25UzDX3T0Te7nRHQQpR6ia4AOc0CE /IRi8dJ0h5QWKPuJakL9KWqV+NZ94HvwdG5XWEM4FOqfnlEWtlqFGeq0CpDNM7Gb2Xd/ 8IHRDhsVRTcKUCfdyCwdu/+ZIFllhW7ppx6Dk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709839962; x=1710444762; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Y7tFAO5LyLvnL3+HqT9Xq5HyhhJG+8Hgt83qwkFfBN8=; b=itTAPtjmISBlixX2RTRQ/fmQhx5m1AnIwf+92XoUMLIbI0Ir0aYkhz7t232HyQ+E0F opTNCiXa8Bd7WadiG8IexSuz9iEjN9TofrcUjwfrQ8PhbEgQgStWqPq0dLC+csLjmt8O 9q9cFf2HSBZBa6LBv6z3fYDZ1gzLhJZB6xmz+mZ/9yM4myUm038UmLAWvj/Vd0oaoI/A 0TBClsuf8RblLl/omHvVIZOVGlHEtW5JkUzSMkXnUJOaqJYf9aCrvzXlxT/4QH8My7Qn p5bMJoEq53hgNSN7AdAKS5A1cO2OlDrW9796AaafboaByHFrPyUn8b9G7rTByfZE97Dt 69+g== X-Forwarded-Encrypted: i=1; AJvYcCXiTJmnamiEYrhmPqZiFc/elpqT7dR9r8iaxKXwSXjHh56d9xa2c5YgdoPVpW4+nztd3BLTKDy02mrAzTFMMgRH5wcC3wwoVahcqxu5 X-Gm-Message-State: AOJu0Yz6hX3fzRISnFCviLqyy4+DjNicvcqWxH+Te9fYi5K1yNAhLooj jvg05KPvSy9wGCsS2UWRvFPwEaCh72VcElfOYtDpD6aB69XFsmxRiHY92ceCWg== X-Received: by 2002:a05:6a00:3cca:b0:6e5:9342:f0fb with SMTP id ln10-20020a056a003cca00b006e59342f0fbmr21379242pfb.14.1709839961147; Thu, 07 Mar 2024 11:32:41 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id x20-20020a056a000bd400b006e65d66bb3csm1526541pfu.21.2024.03.07.11.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 11:32:40 -0800 (PST) From: coverity-bot X-Google-Original-From: coverity-bot Date: Thu, 7 Mar 2024 11:32:40 -0800 To: Matthew Brost Cc: Maarten Lankhorst , Matt Roper , Maxime Ripard , Thomas =?iso-8859-1?Q?Hellstr=F6m?= , Thomas Zimmermann , David Airlie , intel-xe@lists.freedesktop.org, Oded Gabbay , Daniel Vetter , dri-devel@lists.freedesktop.org, Lucas De Marchi , linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-next@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Coverity: xe_gt_tlb_invalidation_ggtt(): Error handling issues Message-ID: <202403071132.198D11C@keescook> 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 Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20240307 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lines of code (noted below) that were touched by commits: Tue Mar 5 16:48:55 2024 -0800 27ee413bbc0b ("drm/xe: Do not grab forcewakes when issuing GGTT TLB invalidation via GuC") Coverity reported the following: *** CID 1584246: Error handling issues (CHECKED_RETURN) drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c:250 in xe_gt_tlb_invalidation_ggtt() 244 seqno = xe_gt_tlb_invalidation_guc(gt); 245 if (seqno <= 0) 246 return seqno; 247 248 xe_gt_tlb_invalidation_wait(gt, seqno); 249 } else if (xe_device_uc_enabled(xe)) { vvv CID 1584246: Error handling issues (CHECKED_RETURN) vvv Calling "xe_force_wake_get" without checking return value (as is done elsewhere 15 out of 16 times). 250 xe_force_wake_get(gt_to_fw(gt), XE_FW_GT); 251 if (xe->info.platform == XE_PVC || GRAPHICS_VER(xe) >= 20) { 252 xe_mmio_write32(gt, PVC_GUC_TLB_INV_DESC1, 253 PVC_GUC_TLB_INV_DESC1_INVALIDATE); 254 xe_mmio_write32(gt, PVC_GUC_TLB_INV_DESC0, 255 PVC_GUC_TLB_INV_DESC0_VALID); If this is a false positive, please let us know so we can mark it as such, or teach the Coverity rules to be smarter. If not, please make sure fixes get into linux-next. :) For patches fixing this, please include these lines (but double-check the "Fixes" first): Reported-by: coverity-bot Addresses-Coverity-ID: 1584246 ("Error handling issues") Fixes: 27ee413bbc0b ("drm/xe: Do not grab forcewakes when issuing GGTT TLB invalidation via GuC") Thanks for your attention! -- Coverity-bot