Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp5159283pxb; Tue, 5 Oct 2021 19:25:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaJtMEmbylnkClPQ6yyL35wKt6/9duEbi6Te4c4bcvuizYRnr8U6mvHByEZTQgEPGRBHGX X-Received: by 2002:a17:907:1044:: with SMTP id oy4mr4417159ejb.308.1633487108292; Tue, 05 Oct 2021 19:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633487108; cv=none; d=google.com; s=arc-20160816; b=LLj/c36uD/txJZ8LjiIgIAickHhRw1vrsj//tSRnUG8X3++xmy0XbsPuvl2ZjT4s5Y 0aTod9x+Lq712qp6ohHH1FdUJSiWAuzpfEzFsxFhJD73R/WHIC8mOJIwfwuiq0LTQLF5 89ERip19oi12Hb2BjVMranm8u36ifdzvWM4t8jqBLX8FKygnX8IrK9XetcLU+ERMALwo U6qN9EW7dmdsN+faoUdVOG+wVB/f5qm68GELgHUgL81CJIZC9WrzzBJ288vnBNscrHrf 9nyrSJVDkw9N+7Dvwe5FcOdK0feQHNHTtvhGwlUIrwjE12LPZGGxkgaRUn/5RwwaIkzh W6Mw== 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=qw5ALBDvPGn69OlbxmlXviRczREpAygguJSlIswWdLw=; b=PPcTWD43G3taj7MOF/3Aq0CVvOI2P1JbUkufOLH9AdCj8b0pDWAw62zHyb543i9XBB DTvhn11Tn7rcAHlISvoXq40zWa5mR1sWwDtuDiOf72kp4MYR/lasbtTjjrOdUwnHotib U61G0UwDXFHoBNnAkk4dOprcLrZYDUUds/nLmeFZI4eyTTYO55atf9vxe4emXRwpUiI/ KLufKqxgf1XZHvO5jK0OfUqqvB0knksWSn/y9YFjMRnrioyWPKp8MDTfLP++MMJemyII Hsdru9NJJVYgUiuPZcQV32V3swDVatqf09sHHnpOChWWiTsjJYpf/lJRU6h8Pitb1W7X JFMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gouZhV8K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si23461451edj.483.2021.10.05.19.24.45; Tue, 05 Oct 2021 19:25:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gouZhV8K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237211AbhJFCWJ (ORCPT + 99 others); Tue, 5 Oct 2021 22:22:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229908AbhJFCWH (ORCPT ); Tue, 5 Oct 2021 22:22:07 -0400 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0515DC061749 for ; Tue, 5 Oct 2021 19:20:16 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id p80so1102879iod.10 for ; Tue, 05 Oct 2021 19:20:15 -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:content-transfer-encoding; bh=qw5ALBDvPGn69OlbxmlXviRczREpAygguJSlIswWdLw=; b=gouZhV8KTp3FExHNgmSHQ9NHjT/H6/1XmoQCCbIXdLmuBMdoHLkUyKYpnhvJm5m9TR mCA9H/CGQFKjUHotNj3soqKVAz3xOTjg+B2dFqVtFImI8FxSasJg8IyJKA0a6hAapP8L BMiPDMN9+TBopb54525kdJsgwGGqZLTPYFYaI= 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:content-transfer-encoding; bh=qw5ALBDvPGn69OlbxmlXviRczREpAygguJSlIswWdLw=; b=ys8P7GGIqtMgDJY+PDO9u5TmFIMSv1KzKXJzdaoaT6QVSCzQNEOqhw5f8o2ZGOutBB mLbVJ1Ee4MsIUXrbtTNsLCDYMLWmoMNqgI2jT8AGGzoVFUWmMEQDXXj/7Rfvct8PODiZ rBE6Mh8hwqVd73RwCCe1m337yWJ02qkf6zHx1fUujtbHP+/ry6aMJSdYNSZXM9+MnsSl Eo3wqZj6WHGi+U4+5bm3wcGMWF4zHl3pl27YG9QBuamP0KB0/LgJcN9xjBRruN/wij95 JHm2X2l3C6OxONOksNQRTG3nnoMjGT2WsC5NhzYNV3m7AWfQeWAA6uaL8hqiK4T6pV6u WGzQ== X-Gm-Message-State: AOAM530K/wDjKmaQCZscswZLJ9K4DTjjKBxQJMe7vYkqnucPR8abhqzI t/mczr/mUM92za1EfYkSM0BfG6JlYpF1Jg== X-Received: by 2002:a5e:a916:: with SMTP id c22mr4516595iod.211.1633486815220; Tue, 05 Oct 2021 19:20:15 -0700 (PDT) Received: from mail-il1-f177.google.com (mail-il1-f177.google.com. [209.85.166.177]) by smtp.gmail.com with ESMTPSA id v4sm570977ile.24.2021.10.05.19.20.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Oct 2021 19:20:13 -0700 (PDT) Received: by mail-il1-f177.google.com with SMTP id g2so225197ild.1 for ; Tue, 05 Oct 2021 19:20:13 -0700 (PDT) X-Received: by 2002:a05:6e02:17ce:: with SMTP id z14mr5414711ilu.120.1633486812940; Tue, 05 Oct 2021 19:20:12 -0700 (PDT) MIME-Version: 1.0 References: <20211004092100.1.Ic90a5ebd44c75db963112be167a03cc96f9fb249@changeid> In-Reply-To: From: Doug Anderson Date: Tue, 5 Oct 2021 19:20:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/edid: Fix crash with zero/invalid EDID To: =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= Cc: dri-devel , Geert Uytterhoeven , kernel test robot , Daniel Vetter , David Airlie , Jani Nikula , Linus Walleij , Maarten Lankhorst , Maxime Ripard , Sam Ravnborg , Thomas Zimmermann , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Oct 5, 2021 at 9:43 AM Ville Syrj=C3=A4l=C3=A4 wrote: > > On Mon, Oct 04, 2021 at 09:21:27AM -0700, Douglas Anderson wrote: > > In the commit bac9c2948224 ("drm/edid: Break out reading block 0 of > > the EDID") I broke out reading the base block of the EDID to its own > > function. Unfortunately, when I did that I messed up the handling when > > drm_edid_is_zero() indicated that we had an EDID that was all 0x00 or > > when we went through 4 loops and didn't get a valid EDID. Specifically > > I needed to pass the broken EDID to connector_bad_edid() but now I was > > passing an error-pointer. > > > > Let's re-jigger things so we can pass the bad EDID in properly. > > > > Fixes: bac9c2948224 ("drm/edid: Break out reading block 0 of the EDID") > > Reported-by: kernel test robot > > Reported-by: Geert Uytterhoeven > > Signed-off-by: Douglas Anderson > > A bit of historical fallout zone this part of the code. So > not the easiest thing to read in general. But looks like what > you have here should work. > > Reviewed-by: Ville Syrj=C3=A4l=C3=A4 Thanks! Pushed to drm-misc/drm-misc-next: e7bd95a7ed4e drm/edid: Fix crash with zero/invalid EDID