From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D77E7C54798 for ; Thu, 7 Mar 2024 19:32:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 84E16113818; Thu, 7 Mar 2024 19:32:44 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="d0/Roda7"; dkim-atps=neutral Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE9851132FC for ; Thu, 7 Mar 2024 19:32:42 +0000 (UTC) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-6e09143c7bdso1063389b3a.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=lists.freedesktop.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=d0/Roda7lQgY9JaNRHcI9u7Ypmex6rnpY74ddZ7qu76t0+UVe2lcTREi5L9/tM3dMd CsImvwJH4Y8wwBezJTxNCIvvaR++0xWRWVASdKadDUh3vA3TbiAej/+tlrOtByuroatk RzVpyK1Wq6vO0agY81pxRXTW9UFfvekojvLCg= 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=RA7pLP+KajtWFmsILTM0T8KWxkChnO2YDEusMm0TCbx1Ylkov2bGvYeihDtl7DqRZv bsmffcK7w4j8pBP8DcoA9P2tOFlIdkU7fxsAAd8OoFVyaayoV48m4G20ROaMI4IAKcRy N7OFek03xH4F07MPjp7ZYT/3TpBEMcBbP81mENQbqlRT9MAm1K6BEJeia7+zOjb4sWwh KLj0Y5vjH5Hh1kHGEJSdrMHnsse+LNGlFQ31JmBl/fMvTyQdKVlpy8kfRPAG6wSGRs5T WqhWiQnD7C2YhD/eCj9W7IWaa0OJeBS4AbBjRd+5Wbt1D6obMMdEaDgW7NCfHJu+ZCEj RBJA== X-Forwarded-Encrypted: i=1; AJvYcCWPxJ8uhS/Uh9d/ZmYzXUepZfz7NEHyl7InceHu0Zq/n3dVnZriqCVh1kul2e670eDonyAFQMPUdaknG6u5pCnh5Yae6FFEn3roEege+K4= X-Gm-Message-State: AOJu0Yw3Kqd2MnwoV66OmM7oR5AMuexamACCShXnB+AjuPbW4kZ879HJ ON0JUL7s2LYluSdNFGQnjirJ5a75UlDkuLYdxxWj9g4nmxX6DUFo1aL3ond/tg== X-Google-Smtp-Source: AGHT+IEXA1GnqxDeU9jnlIUs1LLr1HCKc49pvwZhgKzU/0L/Llfntwa/OA4IWFglH8mIi9V2Pf//fw== 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" 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