Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3329315rwb; Tue, 8 Nov 2022 03:22:09 -0800 (PST) X-Google-Smtp-Source: AMsMyM7fo0M4uvFaF4mpVrZM50S+HdmBK5ZqKrtI8qaRInEvr31Raf9Y9WkzurmyIJ8Q/SOOMZuY X-Received: by 2002:a17:907:270b:b0:7ad:ae01:e0d9 with SMTP id w11-20020a170907270b00b007adae01e0d9mr49678262ejk.196.1667906529402; Tue, 08 Nov 2022 03:22:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667906529; cv=none; d=google.com; s=arc-20160816; b=EGJ4Uei4BtF2TVBX2WTq0tSZ3rhM3fz1sK4xmpEtDIjlBJOVjWtwvcwTKXJcPIDV+J GqHW7l7BlAbMSkx8eDX7vLUkS45vG2TGmv3WYtnVrX9vFtegTtOzGeZaf/eBaRBspdgJ BqghEDGMbcPu8OLSiVfC1reNcOPjNl36n4x3iqBpmWyz4U5GFSPAEkpg5hczJZp8iGDm xQiEO6HHRsEvyeKej1W8tcJIEp5SwvRgAnPVMPIaM4DTe/30FVcZUgmH0RNTHNpBGqv8 fNEXxAmevSs4cC3o/ReIJiF6suao9GM11v1oHITBFlo8jBINJTM98AGaanRFa79iL3gw MZdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=j1v9LLMudnVplkvSffrfFyeVug6QZ0hJMQu3JlDl3Zg=; b=CsYkQ/wBrT8OBDr7Kep2qgoOetDTTVjD2pfl6MwhBcQ3tJSo7obDl3XwvC08zimTj1 iEyStmRm3PirRs4KBN9gsdzZgdoTY4yRGJ1KZbxplcQSueljX1atmY0dgNS4g9M9+3hK bXZImaPTYtqpGTxLIQ0JspMUyt4+B9/x6Q/gNbkHlhvSGdcR1JXDYa9wYf/zrqm47xow mQQ2BMGPwxMHq5oIf2ZgkRQNVAnXwtXl3b3Pre8zpiykH4jQ+OqYBeIvPZPsXn7dwqJH d7I3D241iKPRfn847yupLnfKo5mWQw2uC/lyOh3rPS3UFJyQORGlznQbczF7gw/q1NKZ 4W/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m26-20020aa7c49a000000b0045ca6518751si11140360edq.204.2022.11.08.03.21.47; Tue, 08 Nov 2022 03:22:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233784AbiKHLAE (ORCPT + 89 others); Tue, 8 Nov 2022 06:00:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233479AbiKHLAD (ORCPT ); Tue, 8 Nov 2022 06:00:03 -0500 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7CA14450B3 for ; Tue, 8 Nov 2022 02:59:54 -0800 (PST) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Tue, 8 Nov 2022 18:55:03 +0800 (GMT+08:00) X-Originating-IP: [182.148.13.29] Date: Tue, 8 Nov 2022 18:55:03 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: wangkailong@jari.cn To: Wentland , Li , Siqueira , Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Airlie , Vetter Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amd/display: fix array-bounds error in dc_stream_remove_writeback() X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT6.0.1 build 20210329(c53f3fee) Copyright (c) 2002-2022 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <7bafafdf.f5.18456e11abd.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwCXn+CHNWpjAcsBAA--.39W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAEB2FEYx0DdQABsu X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,RCVD_IN_PBL,RDNS_NONE, T_SPF_HELO_PERMERROR,T_SPF_PERMERROR,XPRIO autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cmVwbGFjZSB0aGUgc3Vic2VxdWVudCBjaGVjayBmb3IgJ2kgIT0gaicgd2l0aCAKRGVsZXRlIGhl YWRlciBmaWxlICJ0aW1pbmdfZ2VuZXJhdG9yLmgiCgpTaWduZWQtb2ZmLWJ5OiBLYWlMb25nIFdh bmcgPHdhbmdrYWlsb25nQGphcmkuY24+Ci0tLQogZHJpdmVycy9ncHUvZHJtL2FtZC9kaXNwbGF5 L2RjL2NvcmUvZGNfc3RyZWFtLmMgfCAxNyArKysrKysrLS0tLS0tLS0tLQogMSBmaW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