Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6322388iog; Thu, 23 Jun 2022 16:48:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uRH3dCCNk7xN5XuBl64l4Wl7mzgGwm9ISUBfmgKYrA+XVexV//Fm35NtH/7riMRhACh/8D X-Received: by 2002:a17:907:d8d:b0:711:d61d:dee with SMTP id go13-20020a1709070d8d00b00711d61d0deemr10488524ejc.670.1656028108389; Thu, 23 Jun 2022 16:48:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656028108; cv=none; d=google.com; s=arc-20160816; b=JX12Vy/eHVg0YOEqJwR0l5gQlFIGnlOrx01wxa3xE/W/oYtd3bEMzvpIb9aPNWGfui HIHs0gyHRQjwwUjsHmntIh/TLPdnLkzpMA+xyJQ71qwmoe0VvkZD/hskaUKte4F6bxt0 vDg/coCtMnsyaYldqMwa226kk+v24VzwY3HwTUiFJpLQnaKSLQA9J6hglcNZH1XiG3Tg i22UktKC4UKlIvArv8Or3kHtn6RgeLrYFheP0J5MiVoC77069GueSgrrODK/nt26URXx r28QTB0LG6ZDhr848xkQrC5MHTWAr+89ACVNbY8JKNm/QXyayRDt9uJEr450CQu4kG1D StiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4ikmHtD58shD6bwBLVpbuZjlxH1kCE1s2bn5lg6TI84=; b=mHh0oq+8yE62KrM7PFOOmq2UhI5//2vqGLCzYUFDXvgBSFxDj06cBK87X+nQ/uiey/ nHU9/hcK+deACQdp6O/3tMnoWkqgsdas5JGTRM7FU9YSjtrF38RkHUgBMnvQypx3FC9v piilFvYju4Vz4z03iKooUZKgWgl5s1hxW1q6RuY9/OKDGkC56ZDB2yt7FmTyM9LgD3Go kQ7wsWD6dAhEPwBn6xkC8LKHVPMXre0LWWrVM0dSrKOiPxPUeW/CL/Gmdi7ESalxbuE7 TikIOxbm/sVbSNX/CU6qnzaXHhsHTwPmi61UcjiO0PGen6HX8YjsHyUOUMSYrVLMRvae Vo6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Idb+m4Mm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a05640242d100b004359a504775si1344533edc.238.2022.06.23.16.48.03; Thu, 23 Jun 2022 16:48:28 -0700 (PDT) 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; dkim=pass header.i=@chromium.org header.s=google header.b=Idb+m4Mm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229615AbiFWXpN (ORCPT + 99 others); Thu, 23 Jun 2022 19:45:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230513AbiFWXpK (ORCPT ); Thu, 23 Jun 2022 19:45:10 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFFE9506E7 for ; Thu, 23 Jun 2022 16:45:08 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id pk21so1377459ejb.2 for ; Thu, 23 Jun 2022 16:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4ikmHtD58shD6bwBLVpbuZjlxH1kCE1s2bn5lg6TI84=; b=Idb+m4MmDg0qMd2DH6fEfYzuuttvLSeFBYJHLxEIpsJQi14s4A53HQuCSN5EPUcDlu cHZr8bJG8h/PTgfMQpO0HbbedR/xKjdcHTojqasgMK1W7NG1vLAyJp2ONOWhpxRkyeua SwHT1Aus7rtxzv/TDgM3Hsx5fXimanh7yIQWU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4ikmHtD58shD6bwBLVpbuZjlxH1kCE1s2bn5lg6TI84=; b=wcnHcAi4Suy3a7pWzSrYAct8LCw/7QiW7Ovn0SfF35RjZPhf90oN4X/g5mrqY8kEKq DVoUpJEFWQbUgSS6v2YqpHB1+49E/BAFG9BU/A2+PM4WppbYAcytzSlyLPqPB/1YbHJ2 mNsLkbBZcOXWgxRMbHqiMovmzpNB72x2j0/O0j+t9uCeVn5coONVLt5J/wN7MvgFBvi1 fBxyTNy/kuoMhDQx3Z7LNSK4mnLj78boopnAqNPWTCvRmzEEi3c1yYVYKTdQaEmYHPL9 eB1nJmgh4hfghn8hxfURx8f5ck98KEaQLY3x5kdlhpMOC+bF8KFaVyHa0x89MULW/o0d FJ+A== X-Gm-Message-State: AJIora9RcxDzyFr0bRRRMxe5gs6n7QuId9qIK3BFBY2sCxdMh0xQvC+x HyMSyoQaXeahYMQp4b2qvwj52Iavp+3BUWtg X-Received: by 2002:a17:907:7f8c:b0:726:2c53:2f82 with SMTP id qk12-20020a1709077f8c00b007262c532f82mr1877405ejc.140.1656027907411; Thu, 23 Jun 2022 16:45:07 -0700 (PDT) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com. [209.85.128.47]) by smtp.gmail.com with ESMTPSA id dx13-20020a170906a84d00b0070f7d1c5a18sm221727ejb.55.2022.06.23.16.45.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jun 2022 16:45:06 -0700 (PDT) Received: by mail-wm1-f47.google.com with SMTP id p6-20020a05600c1d8600b0039c630b8d96so2677897wms.1 for ; Thu, 23 Jun 2022 16:45:05 -0700 (PDT) X-Received: by 2002:a05:600c:22d9:b0:39c:4b1b:5f99 with SMTP id 25-20020a05600c22d900b0039c4b1b5f99mr469227wmg.151.1656027905540; Thu, 23 Jun 2022 16:45:05 -0700 (PDT) MIME-Version: 1.0 References: <20220617172623.1.I62db228170b1559ada60b8d3e1637e1688424926@changeid> In-Reply-To: <20220617172623.1.I62db228170b1559ada60b8d3e1637e1688424926@changeid> From: Doug Anderson Date: Thu, 23 Jun 2022 16:44:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/rockchip: vop: Don't crash for invalid duplicate_state() To: Brian Norris Cc: Daniel Vetter , David Airlie , =?UTF-8?Q?Heiko_St=C3=BCbner?= , dri-devel , "open list:ARM/Rockchip SoC..." , LKML , Sandy Huang , Sean Paul Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 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 Hi, On Fri, Jun 17, 2022 at 5:27 PM Brian Norris wrote: > > It's possible for users to try to duplicate the CRTC state even when the > state doesn't exist. drm_atomic_helper_crtc_duplicate_state() (and other > users of __drm_atomic_helper_crtc_duplicate_state()) already guard this > with a WARN_ON() instead of crashing, so let's do that here too. > > Signed-off-by: Brian Norris > --- > > drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 +++ > 1 file changed, 3 insertions(+) I'm not an expert in this area, but it makes sense to me to match drm_atomic_helper_crtc_duplicate_state() in this way. Thus: Reviewed-by: Douglas Anderson I would tend to assume that this would be landed in drm-misc by Heiko if he's good with it. After several weeks of silence, however, I'll commit it myself. -Doug