Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1577520pxb; Fri, 1 Apr 2022 18:25:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9wheGd6odalaHb/eReSB2hTKJBDbJHhqkZ59RZcpZrbwzDe9ds/WroLG7yPSeofNnKp7+ X-Received: by 2002:a17:90b:3b43:b0:1c6:f878:ea52 with SMTP id ot3-20020a17090b3b4300b001c6f878ea52mr14766471pjb.68.1648862757180; Fri, 01 Apr 2022 18:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648862757; cv=none; d=google.com; s=arc-20160816; b=i9FlwUUh8XgUbPV3DXkCFhhE1BhOgva4KFhJaaTPUCojGMcGhDBmB9bwAQOO4MkQpJ 7aDBMLK2F+de03v7Ouy4CK4NjR/R/LfOcM6dMup+Q4qAiBqSgOPYYS4Jr4zCfb1K+n+a BMl4teDgItxq6QNfWDtWA6IaGGDc1vSjA1MkbYtZXi/tEXTSC9nIkPCW5XbhLZ2Vxj8K D/XuvsASHjlrL+dHWxzwlFXZTPWPPQWYqdyH9BHu02cTZtkFtZi5wk+Em8W+ESZR1Kr+ uKLiojqGyH+Lq3vB0JfJ+3szf86aDVQfLQfj6Ia9vW7z41SXivrJPpTDeSPA3zjmMSTf WzpQ== 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=cpps/7SgFquxKCOj7M8NgIo6De4u6whEjneyMo4UPFs=; b=XviUoMSXmL0cF1WgnWspJvinvEG7GATYcFqCRRlhPBxYbKDs6EK4oYT3PkmSDnB67W z5e6nwpMmTyKvqab45HSW62R284R4ovQchubLOnQFlekM1pcTfZYLPnp3BAGCOv1AN5r Mk5KzFvFggwDo/zbwZV9smMm74Z7jPTA5Hw9jxCeTSyoDHvX+cdym/ZipAm9Mtn0ig97 KuJhDo18PLh/CPb0BhOZ5MVVV3TCq0v3hSZ51MLQEJs8c+CoKf3PeKmgCUoIWloDdfOQ 1y3ToE4CQDI0yMV77yy0GcwB5v0H5aOlqXjN4pa2ADz5kwxZ+NRlBeaczuS3zwvKW0Ws Hy9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Q6PGD1JO; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t2-20020a62ea02000000b004fadce9e1cdsi3640853pfh.374.2022.04.01.18.25.41; Fri, 01 Apr 2022 18:25:57 -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=@gmail.com header.s=20210112 header.b=Q6PGD1JO; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344516AbiDAJ1O (ORCPT + 99 others); Fri, 1 Apr 2022 05:27:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231834AbiDAJ1M (ORCPT ); Fri, 1 Apr 2022 05:27:12 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11DFEEAC87 for ; Fri, 1 Apr 2022 02:25:24 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id y6so2010810plg.2 for ; Fri, 01 Apr 2022 02:25:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cpps/7SgFquxKCOj7M8NgIo6De4u6whEjneyMo4UPFs=; b=Q6PGD1JOHNbZ64V72kkcK/KPtpC2zWKuQycsjZo5rWtV1MiuQ97AuWj1IPyn197/OR Buxc58Q0yQO+JBpQeztseOPQOQr+2TgzFKGW3VzNAR7c6eKjJJXlgIYzCof8QFeoQdFE qbrNgotWTxY/DbY89IYxpbpR/k1NzhsVRpCnpulnaYCTPwNLRwJYGQYzBU6RSJMyGw/p T03kfCYjjr4kzdBsuVJKdBlRyDZAFcSSx9jw/RNGtuNyCQTZKi8nNImONmbNLxIav80a UBzxUJwKxAuRjTrS8p7UlMz3uiyGcdlzZtWBPqTzCWAzO39OBzV7rdUBJVPGBmONkcz2 6/8Q== 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=cpps/7SgFquxKCOj7M8NgIo6De4u6whEjneyMo4UPFs=; b=lN5e+YAKRWewW8vIluaoDYDqWC7gII/u9ZCLfRyQvgofMm4d6ZU2UL/MY23KH5zzzS Q8ndmVYF/op6My2VTV5XNiRiIwldPdl2wPWI0hoGUDcTrzqnHHY+uIUdM2F0X/OzedDR jkiR0PRPQ0f1ZYYA5Tm3iH042kWo6dfnlc3k1phGI9uSlXjPQKAcsavUO3QwJJXFnrZN AaBNvcnSQqqTCOPTnW14MpPFZj7YJnE9kLqq6vJoe4UHvWnwdqZ2gejVoIIKFY6NKZjz VW3zLZKbn90DsHwnkapZhQ6KvzrDnyKpQXn1zquPyI74pFgxq/WUXPxWAr4RPrix5o0l Mbdw== X-Gm-Message-State: AOAM530mAGDVjUfQwTX5ocyhYuwtlIgm/q3cEa3Rk7NbZubxEu+cd0u/ H2KANLZKUCbX5DVdBM6UybUfAdcb6GvahL2YjXPVk4pXmYc= X-Received: by 2002:a17:902:7e0d:b0:156:47a4:a7c4 with SMTP id b13-20020a1709027e0d00b0015647a4a7c4mr9473951plm.141.1648805123539; Fri, 01 Apr 2022 02:25:23 -0700 (PDT) MIME-Version: 1.0 References: <20220330120246.25580-1-xiam0nd.tong@gmail.com> <20220330120246.25580-2-xiam0nd.tong@gmail.com> In-Reply-To: <20220330120246.25580-2-xiam0nd.tong@gmail.com> From: Patrik Jakobsson Date: Fri, 1 Apr 2022 11:25:12 +0200 Message-ID: Subject: Re: [PATCH 1/5] gma500: fix a missing break in oaktrail_crtc_mode_set To: Xiaomeng Tong Cc: David Airlie , Daniel Vetter , "Clark, Rob" , Zhao Yakui , Dave Airlie , Alan Cox , dri-devel , linux-kernel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 On Wed, Mar 30, 2022 at 2:03 PM Xiaomeng Tong wrote: > > 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. Hi, this is already fixed in: commit b1a7d0ddb169774c3db5afe9e64124daea7fdd9f Author: Patrik Jakobsson Date: Tue Mar 22 14:17:38 2022 +0100 drm/gma500: Make use of the drm connector iterator > > 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 >