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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 317E5C4167D for ; Fri, 18 Nov 2022 16:50:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235460AbiKRQuk (ORCPT ); Fri, 18 Nov 2022 11:50:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233401AbiKRQuh (ORCPT ); Fri, 18 Nov 2022 11:50:37 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95F5070A1D for ; Fri, 18 Nov 2022 08:50:36 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id b1-20020a17090a7ac100b00213fde52d49so5563474pjl.3 for ; Fri, 18 Nov 2022 08:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :from:to:cc:subject:date:message-id:reply-to; bh=vDeF35wdLYG1P15QPsioTjibeocs7bxGmPk/YQhsj6s=; b=nEwUH22V3Px2AJ0nfhnVjJM1rBPM9FKR685a6v3VuuhfgW52O+PKMaplMTwyxfiFA8 nKs9/aTXQQ4zPvNHj+eAYhJdYMektFDaVSFAFfKBnKtL8Coa1PcYz3r4Giub0PhK9aJ+ xNxRIaTXBnko1GceMEjnoroVYL6UshpQX/9c4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=vDeF35wdLYG1P15QPsioTjibeocs7bxGmPk/YQhsj6s=; b=POuYfvZ5oNqdx6Ghz2qhMB/WBWWFTIXx0pqeBor6RcW/PPgPK+SdXy1bai25qHBwyh IA0maKPzvVUOe/SDj4G5gM4urJvc6Ufh2WnoudkcNksTr4huKDtL5h2ZbMZ+BO/SfBGd 18ZDD6RpB7lgRp9+V30BmnP1+ZkrhPYI022WZX7DgCCn43mJILxDB45ZSMlvfiW4+YNk 1JKPkLH37YIEmESmcq5ys1j0NYTIxljWjn/XJSAJBkOjBZ0ANRQ4nf7RPfYJaybwpB61 9AAFbRwbvSGVf+kbXdHTgSEBoVfTEV0b4LTJc73QA2ejJlWNpuxjzmQW95ZN0aFrNk/M OYYg== X-Gm-Message-State: ANoB5pmPlitzjRq5AIZrUd7BJrQax2u+SxlWIXiTbLSvFz72/Ncdu+Tz JlZrF4f2BiRxezXhmbGBdCDcNg== X-Google-Smtp-Source: AA0mqf5nc7sx9BVUy4AHRDyHuAxCzDSQw3UQYN4kbHosvvppGk9Ks17mBJFq8EiYAnsMiKkMdrSZ7A== X-Received: by 2002:a17:90a:3e47:b0:213:1a9f:8d72 with SMTP id t7-20020a17090a3e4700b002131a9f8d72mr14862628pjm.155.1668790236086; Fri, 18 Nov 2022 08:50:36 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j15-20020a170902da8f00b00176dd41320dsm3992706plx.119.2022.11.18.08.50.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 08:50:35 -0800 (PST) From: coverity-bot X-Google-Original-From: coverity-bot Date: Fri, 18 Nov 2022 08:50:35 -0800 To: Lyude Paul Cc: David Airlie , Fangzhi Zuo , Harry Wentland , Christian =?iso-8859-1?Q?K=F6nig?= , Wayne Lin , stable@vger.kernel.org, #v5.6+@kernel, linux-kernel@vger.kernel.org, Thomas Zimmermann , Daniel Vetter , Rodrigo Siqueira , Roman Li , amd-gfx@lists.freedesktop.org, Daniel Wheeler , Leo Li , Alex Deucher , "Pan, Xinhui" , hersen wu , Nicholas Kazlauskas , dri-devel@lists.freedesktop.org, Aurabindo Pillai , Hamza Mahfooz , Alex Hung , "Gustavo A. R. Silva" , linux-next@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Coverity: pre_compute_mst_dsc_configs_for_state(): Uninitialized variables Message-ID: <202211180850.560AD5A74@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20221118 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: Thu Nov 17 00:18:25 2022 -0500 7cce4cd628be ("drm/amdgpu/mst: Stop ignoring error codes and deadlocking") Coverity reported the following: *** CID 1527373: Uninitialized variables (UNINIT) drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c:1227 in pre_compute_mst_dsc_configs_for_state() 1221 for (j = 0; j < dc_state->stream_count; j++) { 1222 if (dc_state->streams[j]->link == stream->link) 1223 computed_streams[j] = true; 1224 } 1225 } 1226 vvv CID 1527373: Uninitialized variables (UNINIT) vvv Using uninitialized value "ret". 1227 return ret; 1228 } 1229 1230 static int find_crtc_index_in_state_by_stream(struct drm_atomic_state *state, 1231 struct dc_stream_state *stream) 1232 { 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: 1527373 ("Uninitialized variables") Fixes: 7cce4cd628be ("drm/amdgpu/mst: Stop ignoring error codes and deadlocking") If dc_state->stream_count is 0, "ret" is undefined. Perhaps initialize it as -EINVAL? Thanks for your attention! -- Coverity-bot