Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1155215rwl; Fri, 24 Mar 2023 07:02:56 -0700 (PDT) X-Google-Smtp-Source: AKy350Y3Zt1+LIE7Tw3S0Zzkrkd6pcoeun3HHbvgu+Pc60bIeF7ukAcP7AmYXzNX7WJ32OFwbK2J X-Received: by 2002:a17:906:3592:b0:932:ba53:83ba with SMTP id o18-20020a170906359200b00932ba5383bamr3157615ejb.34.1679666576191; Fri, 24 Mar 2023 07:02:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679666576; cv=none; d=google.com; s=arc-20160816; b=vOtuQ7ralNy4zWfDzjAg9N0qqQyDYZZ++UWzZSjNoYqA+GX/zpDgRQHo5JGRpUHELB JxBJr/rPUljZbiuoJXjq3LUgUZyKUmAFXSgY8O563LIpuhnRvwH0QeTuJMDoIXOl3HD2 kk7ddzOrqSfxE119BLO40V1hntYyqFjwyjWRhhTjfwawgwPJz/+vOytmedtcHr0bK06Y N9kdZpKh5Dp4UImn+4A/m4N6cDLvglmlm9e6Pca40PzHNpxB7imaw4lIgwF0T0ggYkd9 6xlF6EYru9sDHFGJEvWKLGuXtd2K0SLlEwFTvcPKl09tH/k6QWltxtwec+Ob+HQkMK3O tm4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=iF7V5CAbnBV7aSFvkTo8sPOsRSW4aejdNvsX/xVg3+c=; b=tyAJLOI0mjLWaipNB8d0oYD4M2zVzCULZohJE42NRqol/TGIPsjUK6UyC/XPpBZIH7 wynDyZW12G/hDgevdluyjH10oqC++U3k6qEnIiTPEiwuU0xhzPwObbFTAO3YiFuQI4L1 FzEQg7vKjIe3ysD1rEwJJnUL4nBTgcQlWoKy7lHZaamuJ0NU0PIZE/6VYkoG2WamJ/ah GhYxnhnL0sP2DAoiAvVq4p2uBaBg3Fr4MzUct+5vuMLL6WfZl2b8QHJemBGNwDMqVuEm XrQaKP6ev5+WRTpAqkojWCinYBM0AJ2rhV0WjwqEzWD/2TsBKF+X6eyhAy5N5j8tTTM3 oiMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eeKlozuD; 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 ru18-20020a1709068e9200b0093defbd626csi2027830ejc.1011.2023.03.24.07.02.26; Fri, 24 Mar 2023 07:02:56 -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=eeKlozuD; 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 S232195AbjCXOBu (ORCPT + 99 others); Fri, 24 Mar 2023 10:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbjCXOBW (ORCPT ); Fri, 24 Mar 2023 10:01:22 -0400 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9713023A5C for ; Fri, 24 Mar 2023 07:00:32 -0700 (PDT) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-544b959a971so34615537b3.3 for ; Fri, 24 Mar 2023 07:00:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1679666428; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iF7V5CAbnBV7aSFvkTo8sPOsRSW4aejdNvsX/xVg3+c=; b=eeKlozuD/9qQGb9Cx+amJKz7Wz3chF5ViEvj+qR6e9oK9xfD4Rad5Vp8FvCni5EQuv 5Vexjkz8VLQPkUy6wnpKxp4AUJBdgNsH1BhD9RxGvgyNGdFrFuHBzs86sd/nGAe/RgFW T895BhfqdsVH/ozt/SV/f5y1CwlAqRffSpWqI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679666428; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iF7V5CAbnBV7aSFvkTo8sPOsRSW4aejdNvsX/xVg3+c=; b=AI39vduBIYxu66l+6a2RbZxo5r7P89anWV4/0erqfFWRrmq/it4BlxqTezN8dzGTMz d4Quj/pFHMc4Sl/9FdHhYpEQYBqbWEdoGb8weoSzjuehKUe7kwRXzCAzB1qtid4WojnN Gweb2TN3sTMwWW/UIgZutkQjiEC2TbMppdpbFnipXKeD6yRaP29r+faoPK0klLv6OHlS aTkz/mUQV6mEApBG8Nqy+gfqOYzNwOFJ646SnG1nlZ8jwVJeIqGUXjOyqTRT64lGsp0h fvpGiwfTG0myJaEBsutoLNnKqXDVJ6ClgfdePGuSvGrEunfmbTOBqfEgH+PbZ3HrvInr 9loQ== X-Gm-Message-State: AAQBX9c5nisyIXqBjabxwBrv2Fbt19vGhnS7+k6yCMK1+eO+7Gfa6IOC 6O9SfAA0GPhMe084aXNE7PG9nePbvznQYQy9Aho= X-Received: by 2002:a81:9c08:0:b0:533:8b53:5149 with SMTP id m8-20020a819c08000000b005338b535149mr2063359ywa.0.1679666428132; Fri, 24 Mar 2023 07:00:28 -0700 (PDT) Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com. [209.85.219.175]) by smtp.gmail.com with ESMTPSA id cd19-20020a05690c089300b00545a08184c2sm414461ywb.82.2023.03.24.07.00.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Mar 2023 07:00:27 -0700 (PDT) Received: by mail-yb1-f175.google.com with SMTP id j7so2264704ybg.4 for ; Fri, 24 Mar 2023 07:00:27 -0700 (PDT) X-Received: by 2002:a05:6902:1205:b0:b69:fab9:de60 with SMTP id s5-20020a056902120500b00b69fab9de60mr1413085ybu.0.1679666426723; Fri, 24 Mar 2023 07:00:26 -0700 (PDT) MIME-Version: 1.0 References: <20230324035909.1727356-1-treapking@chromium.org> In-Reply-To: <20230324035909.1727356-1-treapking@chromium.org> From: Doug Anderson Date: Fri, 24 Mar 2023 07:00:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/bridge: ps8640: Return NULL immediately when EDID read fail To: Pin-yen Lin Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Thu, Mar 23, 2023 at 8:59=E2=80=AFPM Pin-yen Lin wrote: > > drm_edid_read returns NULL on error, so feeding it directly into > drm_edid_duplicate may lead to NULL pointer dereference. Add a check to > guard this. > > Fixes: 6a17b4d1b52f ("drm/bridge: ps8640: Add a cache for EDID") > Signed-off-by: Pin-yen Lin > --- > > drivers/gpu/drm/bridge/parade-ps8640.c | 6 ++++++ > 1 file changed, 6 insertions(+) Given that the other patch just landed and this is a straightforward fix, I'm not doing the customary "delay" before landing and I've pushed this to drm-misc-next: 14aed8ea48e2 drm/bridge: ps8640: Return NULL immediately when EDID read fai= l If someone else had extra feedback on this it could always be handled in a followon patch. -Doug