Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp564520imm; Fri, 12 Oct 2018 03:04:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV62rC9FNIGO7tMiHn419bof9alJCMzjNZkMqve/y398QUdZPLmKv05qIFh+/nm7PWqsLxPSB X-Received: by 2002:a17:902:6a83:: with SMTP id n3-v6mr5355782plk.288.1539338673559; Fri, 12 Oct 2018 03:04:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539338673; cv=none; d=google.com; s=arc-20160816; b=DT/yXQ2vvL5Ij5ErXzSGfWkNDLO1H+ph93ccRDsFIiRGkQxMrYR328DUmRfM2GmmHt XNfEO5Bfucwp6jZCj4igmlh+M/LzmSkKZJX0ZJ0eVN6s/NgOwk4cxzoCdP0y8B2HmCYK pkr2cRrT/+19/qOk4adaJCoNy0Nij98RoyYKbsbGXvRDj2s43gZongBifhqD8yVa3MV2 96JjOkLBHep+nvM/g87YuJTgd+BUjMjfHD5XnYt7QWD9+N14oCpEjHpBJjmlHBo1uwxO 0JY4TRRmdkZDDDM93SPfdSjnBYL1ngSfFb+kYVfxmPgu4r8DzEOR+15+9TyBY90/TXH1 pUOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=LimTocGO5sVT2/+vmJHXJCtOqCYpqt3ojHzj32GViWw=; b=Nx3A62zgIsQHWF+j7yZLQsFXfIrkQG/cFPcwenVFvCjfCDn3GlHTLCaOAFhxOFx2Jp 9ZdQYOzVrhtbaO4Q85leyWGLToKH2e1t6C2jhpEVNBcGugsnTOLB0iVnnWFwVMeNwZuj /Qf9dcUH2gjUZVbZQ48wqvAm1g4169amqlfGMen9/CJoZ6JfYAJknOqeJYKoRinAhAAy txs5lXZ/WRHIHzdU9+81HIv4U/GCipy5Xsq5sHB9XL/vvHx7KAOismuJlTF4E3I7HqKS fHswh+p3P3WzAOfxfNV+nHcskaQ7u4UcTGUG5g64b8w0Mc2Z2Y8q6GBLXmgWnLHxlpMt rVKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14-v6si843073ple.236.2018.10.12.03.04.18; Fri, 12 Oct 2018 03:04:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728264AbeJLRfg (ORCPT + 99 others); Fri, 12 Oct 2018 13:35:36 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:44290 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726917AbeJLRfg (ORCPT ); Fri, 12 Oct 2018 13:35:36 -0400 Received: by mail-ed1-f67.google.com with SMTP id z21-v6so10950409edb.11 for ; Fri, 12 Oct 2018 03:03:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LimTocGO5sVT2/+vmJHXJCtOqCYpqt3ojHzj32GViWw=; b=q1xEcz/UzyGBIX71OOK8lLwPps+R+MxeA2zmpyn6uaoEVxL1Iv962bvLjfmz1DWAXM BSiRgJBSbfene9q2/r5cJT6d8uV0rjHqAwMmaPLY3GtGvqToU3Q7buCQ25NqAWb8X1ng HQVEbj+cU7JUHyt+gSwvz8xzwO7lOy2pylOoFwrqhBFWNmvlZiUu4NpTWW2Wjp5XorvS 5qHGoQ1t1OrlhYi3emmnUBQ92pLpTs585/0QqILsT0Zr+u3w9P0+SsXaA9aJeSzxODI8 2ltthl6V6zJprSKFI/AGOkYrPtEr7WIvl2jDx0/nG0b6THXp/Aze8tzDTLaI3QtneJ5i xbTw== X-Gm-Message-State: ABuFfojUeagyDSAOidY4n4YiyO6/O2njQIVf1hPiomN9fZLyVXFlTlS8 K3t/hMUucYU3vgx1+Byrln8bBQtsDxI= X-Received: by 2002:a50:852b:: with SMTP id 40-v6mr7789623edr.177.1539338636844; Fri, 12 Oct 2018 03:03:56 -0700 (PDT) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com. [209.85.128.42]) by smtp.gmail.com with ESMTPSA id r55-v6sm561121edd.80.2018.10.12.03.03.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 03:03:56 -0700 (PDT) Received: by mail-wm1-f42.google.com with SMTP id 193-v6so12304996wme.3 for ; Fri, 12 Oct 2018 03:03:56 -0700 (PDT) X-Received: by 2002:a1c:e717:: with SMTP id e23-v6mr4700629wmh.145.1539338635750; Fri, 12 Oct 2018 03:03:55 -0700 (PDT) MIME-Version: 1.0 References: <20181004195605.txvbkshvxklyzxyb@flea> <20181005215951.99003-1-giulio.benetti@micronovasrl.com> <20181005215951.99003-2-giulio.benetti@micronovasrl.com> <20181008092111.qcufr4o7cy3nnj4b@flea> In-Reply-To: <20181008092111.qcufr4o7cy3nnj4b@flea> From: Chen-Yu Tsai Date: Fri, 12 Oct 2018 18:03:42 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 2/2] drm/sun4i: tcon: prevent tcon->panel dereference if NULL To: Maxime Ripard Cc: Giulio Benetti , David Airlie , dri-devel , linux-arm-kernel , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 8, 2018 at 5:21 PM Maxime Ripard wrote: > > On Fri, Oct 05, 2018 at 11:59:51PM +0200, Giulio Benetti wrote: > > If tcon->panel pointer is NULL, trying to dereference from it > > (i.e. tcon->panel->connector) will cause a null pointer dereference. > > > > Add tcon->panel null pointer check before calling > > sun4i_tcon0_mode_set_dithering(). > > > > Signed-off-by: Giulio Benetti > > Fixes: f11adcecbd5f ("drm/sun4i: tcon: Add dithering support for > > RGB565/RGB666 LCD panels") > > Reviewed-by: Chen-Yu Tsai > > Applied both, thanks! I think this one could have been applied to drm-misc-next-fixes, as the bug was only recently introduced. We'll have to make sure it gets backported somehow. ChenYu