Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2218664pxb; Wed, 30 Mar 2022 19:42:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv8r0yQrGW3hfKrAt52cOd1dKXg8Dzufb6MSHRonScMEDPRn7xs3DQa/4ZFbsPG3oIgsva X-Received: by 2002:a17:90b:4d87:b0:1c9:7f58:e5ca with SMTP id oj7-20020a17090b4d8700b001c97f58e5camr3334590pjb.154.1648694520592; Wed, 30 Mar 2022 19:42:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648694520; cv=none; d=google.com; s=arc-20160816; b=u4KA4REnTqjNB5wPEgN82CSy/w3w1ZYBVhVW7LLCQXtnMli4c3SPPa0nf4ME4UXbZW UtgmfWL2KQxrXlPu8iPaybU+1A1IXldjBXQ5gH8PWyqzOPs0X3bjTSSCSP2HhGSzx02B KKs3SmKgp1Y4fkIEtxrjYmtOeU2paxMbT19ZZKRXYejqLexSxsU8gQ6Yrz9zGt33fMO3 ubpXKsXsxMPHReQ+ZBKEO5eh8/hswCsIbAN0yETNAUhmrGRxXZECICTRejxSA1NRoHp1 T7jBN3G0EPAGiIH3AfPIo38wm6Rx07b5TA4e3RSWf0ju5ikhos5zgr8OHc8CEC8TpIR/ hhXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=v0/H3G2XFiR4LVmAPedHiWgw4TnVBjO8kBG30Rx6UL8=; b=vklYtsS9uvYlt+KF+8Xvu6H182WlKu7nVgECAxBBY4mHwGmkyR/PlcHxLnA/QLTNLf 33oblXk64Zt6NHg85Lv8n/m+NeFueGu+/AjChnqH/kExE6Ggu11gf7zkLsuy1qoeEYil IqIzMZXbUuC8iDDLKDRB5faMX9wYKumzFMW0oRpPulNh6uN/9Z34f7a7FbxIVVQrIu/X EJxGlrFnuJUysdDclAFOF+LKQxPgb4pQ28qjdlBC5INQhL2hg6FcHOjW837Jr8GK3Yro e3suWbLTsSIJvgyfLDEJ4K15SDkZQ1j6unprvXWeg8YTzLuH9MxDVjukcj+0lz/5rYer DQgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mL8TYadv; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n2-20020a170902f60200b00153b2d1663dsi23054923plg.581.2022.03.30.19.42.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 19:42:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mL8TYadv; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B2BEA0BF9; Wed, 30 Mar 2022 19:33:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344446AbiC3MUO (ORCPT + 99 others); Wed, 30 Mar 2022 08:20:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347284AbiC3MGI (ORCPT ); Wed, 30 Mar 2022 08:06:08 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8407FF3 for ; Wed, 30 Mar 2022 05:03:16 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id b13so16626706pfv.0 for ; Wed, 30 Mar 2022 05:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=v0/H3G2XFiR4LVmAPedHiWgw4TnVBjO8kBG30Rx6UL8=; b=mL8TYadv8FwnRuRKoTITRg23I+zj3YpjUkS/HxsO1mXhazrpiNa/gQ9ZhqpLDQUrqI Y4H2jEfLUG4ejF2Bhyey9dkFvUs/W7aQIxqRp7nhurrbYn5LEk8qic5kstmJh4wXg7BW Vdk2mKx1nPOwuwOvdqhVdNM5wUN1AsyMVOeIItxhTubGPYT2Q8biMXZkuzyQGVRcL8TD vLAWHCkbUHL5ygmf5oFmiadYdSKWECmwoPmeze/QJEwdiUr0+MG7BhrV7gvPojJCLQft q9izu8XueDRFAoQOtCX/qStvq7xqphJMDjzgUjUwfkywmVU/2xgyEbSfGahUW3czat4F z9Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=v0/H3G2XFiR4LVmAPedHiWgw4TnVBjO8kBG30Rx6UL8=; b=vlj5zlA4WwCiANx1zaBRhBVpYGkaqAPMGWDaLZ2LcvRNvSBcDdrHxHbLDqUrEHQ3ll 65DOLql0MIshjbab360Gg/a4OCfxXz44aeeIczrmwflVH2vH0dsVnUqN0zOepxpn57GZ y/m84CFzsdl7ETXlF6OW3xyJkwUJ994m6jxgU9L0/8rDMVAVkTKr4+WMJuzvg8LG6v58 wa08AKoxid1K9wIk+xJS3ZUF6EJoXmV6HmDutoC98J9YHhHJetSIY3H+pcp14lzvsQkq jWmeK6e7996pdJU6w4u/88pqEIz0aQ1pnsC6rOzhNTS+Ickrb7gt4FhnE3FIWdFehlUk cmlg== X-Gm-Message-State: AOAM5316v3J7sclmnHzwANVnnktrNjrGnnaPoVJcczwoCVK35rfwq6dB +uuCmxK8btxNX7GsoBEl11c= X-Received: by 2002:a05:6a00:194e:b0:4fb:32b9:dfd2 with SMTP id s14-20020a056a00194e00b004fb32b9dfd2mr19805610pfk.10.1648641796180; Wed, 30 Mar 2022 05:03:16 -0700 (PDT) Received: from localhost ([119.3.119.18]) by smtp.gmail.com with ESMTPSA id j9-20020a056a00130900b004f73df40914sm23142978pfu.82.2022.03.30.05.03.14 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Mar 2022 05:03:15 -0700 (PDT) From: Xiaomeng Tong To: patrik.r.jakobsson@gmail.com, airlied@linux.ie, daniel@ffwll.ch Cc: rob@ti.com, yakui.zhao@intel.com, airlied@redhat.com, alan@linux.intel.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Xiaomeng Tong Subject: [PATCH 1/5] gma500: fix a missing break in oaktrail_crtc_mode_set Date: Wed, 30 Mar 2022 20:02:42 +0800 Message-Id: <20220330120246.25580-2-xiam0nd.tong@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220330120246.25580-1-xiam0nd.tong@gmail.com> References: <20220330120246.25580-1-xiam0nd.tong@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Instead of exiting the loop as expected when an entry is found, the list_for_each_entry() continues until the traversal is complete. It will certainly lead to a invalid reference to list itereator variable 'connector' after the loop pointing an bogus address at an offset from the list head, and could lead to multiple 'is_*' flags being set with true mistakely too. The invalid reference to list itereator is here: drm_object_property_get_value(&connector->base, To fix this, when found the entry, add a break after the switch statement. Fixes: a69ac9ea85d87 ("drm/gma500: drm_connector_property -> drm_object_property") Signed-off-by: Xiaomeng Tong --- drivers/gpu/drm/gma500/oaktrail_crtc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c index 36c7c2686c90..eb2d79872bd5 100644 --- a/drivers/gpu/drm/gma500/oaktrail_crtc.c +++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c @@ -409,6 +409,8 @@ static int oaktrail_crtc_mode_set(struct drm_crtc *crtc, is_mipi = true; break; } + + break; } /* Disable the VGA plane that we never use */ -- 2.17.1