Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4186207ybg; Mon, 21 Oct 2019 05:14:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyluen2klDsrpLs1Rmg1VUuYTl2XiibEZyJRcTTXd05z42h50CIrUdlT5b3THuLuvvMKbA+ X-Received: by 2002:a17:906:6d87:: with SMTP id h7mr22028340ejt.4.1571660083783; Mon, 21 Oct 2019 05:14:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571660083; cv=none; d=google.com; s=arc-20160816; b=bSMj+UfW0dT6+Dv906VonwXcXmY7iA3h+KMXTj0/0rRXmQzKk0Hv8A67oPnLhdRozQ 7gvx8Ww8M6wGDZdwMSVp5yAFqT3tzDJ0R85PzaG8SEsTj4xlWLRexKEGLv45eN+KwRMk SpjpczJJ6t5ZO//ObMx8WctpHEm9udzQcX8sI9uy8YcBRq2JJoOVGEAPn8Gw/QTcdYsb vIEwE8baWo8SC2CwXZ6xjWQX9XjnE45izWGKNiOHecuJGCl5w8YWpz5Re5F1Aki4Aa3n kpyBRrfcPdWSzIyodm3PWLafUy/pGjwWnso1x2uLzDpSzs3IO1V8pe36FCE5vGwotY64 Mw7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Qq1jjtb84r8V2GL8tTrePJp3Od93UyO6bWhkZkISdqA=; b=Kbt18P5KRuXuygD//UINsVvVVkGSy43OWDQngLcwHpCIPqE8CEvgy7686YQ2MEZ9ET yhlBEbX4yHTG3WlVS2/+hLQt2T6JUUlrhXoVYi6+ilgYpw5XnlaQDlGVz8m8V3FiZ3wf /jngBiv+d7d3r6qY1L0qgdX7g9uZrePcXMdptirHjSQfZzuTg4dsNhA1TbsWYjLCvYvp Se0iPLJzx3rL4mBGxMj5HMnUGBsZfpxuJwZf1SNnj3lnU9Yh97fvmPBSmvVW+VrNJsX7 nzj+lPrI760OvG4FE5OVnoWFVbUxeRTbV/8mPxb6Mcjo9bwOc41AQYt8fXCLwPqblPXm r3zg== 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 h40si5240702ede.176.2019.10.21.05.14.20; Mon, 21 Oct 2019 05:14:43 -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 S1728327AbfJUMMl (ORCPT + 99 others); Mon, 21 Oct 2019 08:12:41 -0400 Received: from sauhun.de ([88.99.104.3]:46474 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727959AbfJUMMl (ORCPT ); Mon, 21 Oct 2019 08:12:41 -0400 Received: from localhost (p54B33572.dip0.t-ipconnect.de [84.179.53.114]) by pokefinder.org (Postfix) with ESMTPSA id C6FD72C0076; Mon, 21 Oct 2019 14:12:38 +0200 (CEST) Date: Mon, 21 Oct 2019 14:12:38 +0200 From: Wolfram Sang To: Fabien Parent Cc: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, tglx@linutronix.de, hsinyi@chromium.org, drinkcat@chromium.org, qii.wang@mediatek.com, matthias.bgg@gmail.com, Cengiz Can , Ulrich Hecht Subject: Re: [PATCH RESEND v2] i2c: i2c-mt65xx: fix NULL ptr dereference Message-ID: <20191021121238.GD1145@ninjato> References: <20191018173213.13282-1-fparent@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Ycz6tD7Th1CMF4v7" Content-Disposition: inline In-Reply-To: <20191018173213.13282-1-fparent@baylibre.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Ycz6tD7Th1CMF4v7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 18, 2019 at 07:32:13PM +0200, Fabien Parent wrote: > Since commit abf4923e97c3 ("i2c: mediatek: disable zero-length transfers > for mt8183"), there is a NULL pointer dereference for all the SoCs > that don't have any quirk. mtk_i2c_functionality is not checking that > the quirks pointer is not NULL before starting to use it. >=20 > This commit add a call to i2c_check_quirks which will check whether > the quirks pointer is set, and if so will check if the IP has the > NO_ZERO_LEN quirk. >=20 > Fixes: abf4923e97c3 ("i2c: mediatek: disable zero-length transfers for mt= 8183") > Signed-off-by: Fabien Parent > Reviewed-by: Cengiz Can > Reviewed-by: Hsin-Yi Wang > Tested-by: Ulrich Hecht >=20 Applied to for-current, thanks! --Ycz6tD7Th1CMF4v7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl2toLYACgkQFA3kzBSg KbZHYhAAl8PJLRm3n1nm+VexzkwL5Vr5flPI4eZvMIG+4oHfei8QC90cd7qAMaid FLmD34xBk+wvW4QUp4VH/UoKm058/2xXE8xPEvVAZdxSVfhpU9tqkOsL4exxvv9A ERB4uZvYNbirHWOEv4XgxMSKucnFU+HwcDKqR0JjVWcYfl7jRKoq8lWgiQ0lPSc2 y87dyYhM6Kp5XU3lGd8WqJbArlxT0h+4IzshXhg7Jh/nbqPIeu+R5jX1ilt1bj/A Sk7UCssar8LQ9Xj8kYXWhm7YJZ4mD3DaQ5yvl086mI2QOuAd65MYsU8IiW1/Bq1f JzBNSL0nms9CSZwnGL84qa4BC/3PT+MWMTDQYlsKAJAmhz4zkw8JMp2F4uI3KaZd p4uX+T5ecjdljvDga5HEsJ9zumJl/U+Hy3jxY+rxLDF+3ZiTVrQa68Hft8S97OI/ 83Q2LikqYYsbUJBXl/6asEdcpitFQwP545w/sSa5wa1kXBwCeCoAbFCxC+s4Sp7H aXZQDALTnUeYSLi12K2LYzZ3JZcjr9rPBg5EDNssm3U+SZBC+YESlNIEhGM6HMzX ZqHdhYmKM4FRI8F5fQ5ck7NQjq6GKckVIdUQM9q9eb/HdTw2ChgvetaVFO4JcdD+ WhaIBzgT2gL6ESoLO5gvFya2cV8faV+zrg+SzykofwM99hR4DtU= =hHgJ -----END PGP SIGNATURE----- --Ycz6tD7Th1CMF4v7--