Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3812765ima; Tue, 23 Oct 2018 11:41:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV61raliDvfzcFjfurlhuEpxFu522FtvK+yUr7MLU/P837J8jJBi3ecBC8IP7yqMJ9bd21aCP X-Received: by 2002:a65:4845:: with SMTP id i5-v6mr25407638pgs.399.1540320082013; Tue, 23 Oct 2018 11:41:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540320081; cv=none; d=google.com; s=arc-20160816; b=fJX/vYc5msadYsyn06PIzUf81dt+UZ0eNC3gUZB3/92cSZYxGT5LAB6N9bo+zWmlrc 0jQiivREEtKvwHJFjWhEowT6tCD7SBBbaSECMR/ilpzKJefctVIyAWbcbAdDsnS+V9yI hXse3dUzcxfDSECIG6U9dqUOJH2jkesTe7AswX/fhcoFaJQfNS7hRQwQjxnnSQlkMDYy jreLbCeEOOSBIES0xglhezVjh2k0JsGm5BOR6MlQZZBWyol+xbN4dbBshWNkD0ooMRKR 5lPB8W+5OK2r7gouCv2txwst0ynm61qSPSm5QwVTET/NBOaKvm+N3Qb7YFjhKFo5q8mU SrPA== 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:dkim-signature; bh=lAcMIWIm2f7vdro2TdKm3qS/n5TYrS68sIUAzxyxAsE=; b=EXthnYLkacWgNCQ5FAqBymbTUxXUQ1ES1UUrtMSzvhnqHD2fEFQNolDHlpz2mHI8M3 +y1+SwmKdTCzyamBhkwbM3pN+k65DWeMvZASMxwaI6aSS3di2GNs+qMXQvWOe/J6TUGW F2EcoYLipnl9uX/x/k9TF/+Llv5x1Og2RPcEisjhPHXBDE1AdEJqgF7E6WsEvSN5HEG9 JkYMrF4ixXjf6oqU0akysYO/4qMU/z6rZ0U0manEuoeTaz8rVwZoo1CqsN0bx+1rfR2r 5oQuIWJ1UY3FVCZ2qYLz65a+hjlfmvoI57Yhtha4nuWyzjZ/6riuh81WgyoCioptkLLb /GsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZG2CGAlQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9-v6si1753466pls.378.2018.10.23.11.41.06; Tue, 23 Oct 2018 11:41:21 -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; dkim=pass header.i=@kernel.org header.s=default header.b=ZG2CGAlQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728608AbeJXCwx (ORCPT + 99 others); Tue, 23 Oct 2018 22:52:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:37396 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727829AbeJXCwx (ORCPT ); Tue, 23 Oct 2018 22:52:53 -0400 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 90845204EC; Tue, 23 Oct 2018 18:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540319301; bh=G2PlBONjhBi9sv1Xw4h/cc+8zN2vfVGL036aDNPg7aY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZG2CGAlQf8OO9gLkJXvzk6IwdqMpSRc9UXnsKDlXN04dRLpieip4Nq2TxeKtVHFZP +kYnH59bpFiLl/PtP1Beytul3kF/Kknt1e5G2Xe8f17SmTFaEkVt7CavfN4zWN8x8m Nv9J8AUv74IMRfFVKlVVQPfg3J0tvH8mnVZVOtR4= Received: by mail-qt1-f172.google.com with SMTP id a10-v6so2708343qtp.2; Tue, 23 Oct 2018 11:28:21 -0700 (PDT) X-Gm-Message-State: ABuFfogbdHd3m5li1C8+lX3yb/OaL0/4GIZ6dH9Uu/dj1VblR1IlAQuz vSUT/gP7PstNv9xUuxnsev0iqK+ay0k9udC2Fg== X-Received: by 2002:ac8:3a64:: with SMTP id w91-v6mr49731392qte.144.1540319300770; Tue, 23 Oct 2018 11:28:20 -0700 (PDT) MIME-Version: 1.0 References: <20180827082153.22537-1-johan@kernel.org> <20180827082153.22537-6-johan@kernel.org> <20180827102820.3abf7291@bbrezillon> <20180827084414.GZ14967@localhost> <20180827104842.26bce912@bbrezillon> <20180827094423.GA14967@localhost> In-Reply-To: <20180827094423.GA14967@localhost> From: Rob Herring Date: Tue, 23 Oct 2018 13:28:09 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 5/9] mtd: nand: atmel: fix OF child-node lookup To: Johan Hovold , Boris Brezillon Cc: Greg Kroah-Hartman , Frank Rowand , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , stable , Nicolas Ferre , Josh Wu 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, Aug 27, 2018 at 4:44 AM Johan Hovold wrote: > > On Mon, Aug 27, 2018 at 10:48:42AM +0200, Boris Brezillon wrote: > > On Mon, 27 Aug 2018 10:44:14 +0200 > > Johan Hovold wrote: > > > > > On Mon, Aug 27, 2018 at 10:28:20AM +0200, Boris Brezillon wrote: > > > > Hi Johan > > > > > > > > On Mon, 27 Aug 2018 10:21:49 +0200 > > > > Johan Hovold wrote: > > > > > > > > > Use the new of_get_compatible_child() helper to lookup the nfc child > > > > > node instead of using of_find_compatible_node(), which searches the > > > > > entire tree from a given start node and thus can return an unrelated > > > > > (i.e. non-child) node. > > > > > > > > > > This also addresses a potential use-after-free (e.g. after probe > > > > > deferral) as the tree-wide helper drops a reference to its first > > > > > argument (i.e. the node of the device being probed). > > > > > > > > > > While at it, also fix a related nfc-node reference leak. > > > > > > > > > > Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") > > > > > Cc: stable # 4.11 > > > > > Cc: Nicolas Ferre > > > > > Cc: Josh Wu > > > > > Cc: Boris Brezillon > > > > > Signed-off-by: Johan Hovold > > > > > > > > Acked-by: Boris Brezillon > > > > > > Thanks for the ack. > > > > > > > I'll let Miquel queue this patch to the nand/next branch, unless you > > > > want it to be merged in 4.19, in which case I'll queue it to the > > > > mtd/fixes branch. > > > > > > Note that there's a dependency on the first patch of the series which > > > adds the new helper. > > > > I was not Cc-ed on this patch :P. > > Yeah, sorry about that. I made sure everyone was CCed on the > cover letter, but guess I could have reused that list for the helper as > well. > > > > Rob can pick up the entire series if the various > > > maintainers agree, otherwise I'll try to get at the least the helper > > > into -rc2. > > > > If everything goes in 4.19-rc2 through Rob's tree that's fine, but if > > it's queued for 4.20 we might need an immutable tag just in case we > > queue conflicting changes to the NAND tree. > > Ok, thanks. Hi Boris, can you pick this one up. It conflicts with "mtd: rawnand: atmel: Fix potential NULL pointer dereference" Rob