Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2088227pxk; Sat, 3 Oct 2020 07:47:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7gQFGfsmS6XgxNskucFwazsHnNJj57LMJ+LAfr0pLRFxOi+ppyyYrOGiQWqTE7S+uByqJ X-Received: by 2002:a17:906:7e0e:: with SMTP id e14mr6671733ejr.238.1601736459928; Sat, 03 Oct 2020 07:47:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601736459; cv=none; d=google.com; s=arc-20160816; b=o4E30Noqk51V77K2UFilgUBuAiAdZmBlc9xdYX8LA+WU7EZSyGuowbFHys441BIz2B JbcWLWv6eI+tYSBmubntlkYRLNX7tnvvGidBc7En3oHqW+W0z+COS25NSkBQzghPFoF0 zQMBTRajVo1z27ew7S1XVDdqobB+1Malwxm8NK19DIvbLoaUUZh2B5mAGgd3abPnhrnW vo7uS14G5odZUoXnEXw06LyTWMrFft02TdMPFGSb9B4jvtlQ7eRqtnGQ9GRXvY74hWFo Nd34/6Ubie72mT8u+tXCsvCCz2+n6rcqPUNe9n0TKuCskHKms6RPEuumLk86jfIv14d6 XZLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:subject :references:in-reply-to:message-id:cc:to:from:date:dkim-signature; bh=6WyTEoXuKf0olD8hSeaW5OFlnE+TW4/q7RwsOuaz+qM=; b=L8tRNS5zJqL4S3eAUVjcGNqewP2XTtCGEZXOCXwkfIW1MREj4L61uBkx+inyg2sA1K hZHXGr+SUYXrdyJgMUvN6eYwt0ZuGWBxGPSnuOCq3RS/uqK7FN4HinpBIRwfYdcjLtRU lBw3zBB0CEe+a8wrM3mc7231xm1t9Rhwr5+Tlsjfuebfr3NzO3diYoIWutUrjnPZYJ9T QEajgHcN6GdxiRoWr5zxnuc6SL3uhjji+E6QsdiR7HULIRBsboXGwCzLX6E/18O76JQl 7uZBM5HpQM8oUIau7dm5FjdhkBN0IUGA2N+X+zUgWEDoNhfaFieIasazZXuqTsDrQJir Rsjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tutanota.com header.s=s1 header.b=PjFzWMpM; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tutanota.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si3465023eja.436.2020.10.03.07.47.16; Sat, 03 Oct 2020 07:47:39 -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=@tutanota.com header.s=s1 header.b=PjFzWMpM; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tutanota.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725875AbgJCOnT (ORCPT + 99 others); Sat, 3 Oct 2020 10:43:19 -0400 Received: from w1.tutanota.de ([81.3.6.162]:48906 "EHLO w1.tutanota.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbgJCOnT (ORCPT ); Sat, 3 Oct 2020 10:43:19 -0400 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id D88B5FA0440; Sat, 3 Oct 2020 14:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1601736195; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=6WyTEoXuKf0olD8hSeaW5OFlnE+TW4/q7RwsOuaz+qM=; b=PjFzWMpMp5M0G7gbXo5sOdoVQjUs+xRoIYbSzwk5Wd+YQUjxn0bIZoQVC2+xnj7p sWyKKt62/C8gImT+F1M8xDpxP6Sg2T5yw1DAG8Q4Pc+XtssXDoiPnOTKs2i3NuSKgHF 8bA4t4bAAtku44tUtfBPrtL3dkd9r253trBNbgwihVOuAhXxT6bzcDosD4KUHJlmDvv fUCMm+ujy+AjWA5hMfiy4oS8yNC4oFsBiR1ZFahUr/wWcrqY2fkLM+tbUXGXUpGLn/G vlloBJsFMehe2eIch7ve8JHPpPXTrfIjecxpFg5j8fi9CN5aw/3EjBLv1GneQhd7Noz 8/P07FuSag== Date: Sat, 3 Oct 2020 16:43:15 +0200 (CEST) From: ultracoolguy@tutanota.com To: Pavel Machek Cc: marek.behun@nic.cz, Dmurphy , Linux Leds , Linux Kernel Message-ID: In-Reply-To: <20201003135600.GA25460@duo.ucw.cz> References: <20201003135600.GA25460@duo.ucw.cz> Subject: Re: [PATCH] leds: lm3697: Fix out-of-bound access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >I'll need your real name to apply a patch. My real name is Gabriel David. >Ok, so I assume this is only problem with certain device trees, and not a problem with dts' in mainline? Yes.=20 Here's the current node I'm using that causes this bug: &i2c_5 { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 status =3D "ok"; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ti_lm3697@36 { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0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2=A0=C2=A0 led-sources =3D <0 1 2>; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ti,brightness-resolution =3D <2047>; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 label =3D "white:backlight"; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }; }; >This is not trivial patch, no need to cc trivial tree. OTOH Ccing Marek who did a lot of cleanups in -next might be useful. Doing that now. Sorry for that. Gonna CC Marek from now on. Btw thanks for the quick response! Oct 3, 2020, 13:56 by pavel@ucw.cz: > Hi! > >> Signed-off-by: Ultracoolguy >> > > I'll need your real name to apply a patch. > >> Hi, all. This is a patch fixing an out-of-bounds error due to lm3697_ini= t expecting the device tree to use both control banks.=C2=A0 This fixes it = by adding a new variable that will hold the number of used banks. >> >> Panic caused by this bug: >> >> <7>[=C2=A0=C2=A0=C2=A0 3.059893] CPU: 3 PID: 1 Comm: swapper/0 Tainted: = G=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 W=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 5.9.0-rc7-postmarketos-qcom-msm8953 #71 >> > > Ok, so I assume this is only problem with certain device trees, and > not a problem with dts' in mainline? > > This is not trivial patch, no need to cc trivial tree. OTOH Ccing > Marek who did a lot of cleanups in -next might be useful. Doing that > now. > > Best regards, > > Pavel > --=20 > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/b= log.html >