Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5702558imm; Mon, 27 Aug 2018 02:45:49 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZdmPEIQcJ4Hmu5ZzvruTVPMEgiuK5vrUjfJWbbu2CI+MwEfOjkKicFBzFHqo24+U6gRhvS X-Received: by 2002:a65:4285:: with SMTP id j5-v6mr3742475pgp.446.1535363149273; Mon, 27 Aug 2018 02:45:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535363149; cv=none; d=google.com; s=arc-20160816; b=Pp4tGdx6cBLw0/UTxg1AWIarVMpiSwwCR98icNVnXsu1MRMZ25Klg272uNlErgeBkz DOKXJLHKcmhzinxCVLfwXKBH8dAqb9YQ5IjfnYbgIQEwuvGqpYrD5nQy54hnWEvKRm1U 8LLipXqzQ2FbVxHVPBO9GP1tIWQuBRn5QNjI0UHWUU2erA6/kt7JLLTQYkduiw7RudYW N1bS0E6iQfs6xY7twp6pYDFCRsRmZLM36SbJ2twryHSOk+GsBXA2sswxidmZkM9mTX0c B9TDwuCBtMDgn5NZsCDNBCKsawxGIx4kEwNCUSLNGeEfsrSFuBH5ncpHmeUB/y8a2lIU 85jA== 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:dkim-signature:arc-authentication-results; bh=XLQFTafYzMFh2BQ1WlYD2Ng2koSEMQyinUqrNanOj7Y=; b=mnpbgCU0Fpm0A+GFKUbQ8Hazzl1r8YclYHwgY3g/nX0AiDmwR8lbJKbwQ7vEWUxMKw +/EENgZxZnRqCkrR0z6fJrM49H7SkJaCR4ij1lwXY7iDD3XAjySZZrPGLmxNNxOUn4IP MG08NgaD9H0Gsk0+BR/SE7CqrwQQsS+CxvM2omutpIlmcBGzMce5JuatGVc/AdHuLS5g 5ijcYy+mpBdmdpF3zeNg4BicWcRFs89YDTWo1OtGWkd7gz7UTYKYfjSda/sOngBkHKCa j0hyt4V+sB1e2LdZprIrdPZZneWxK9iswgzX2EccVIKqahEWtsLuMuJH4JAo/SKX+XMj yX3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kSpAl3gN; 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=fail (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 e185-v6si13888016pgc.318.2018.08.27.02.45.32; Mon, 27 Aug 2018 02:45:49 -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=fail header.i=@gmail.com header.s=20161025 header.b=kSpAl3gN; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726953AbeH0NaW (ORCPT + 99 others); Mon, 27 Aug 2018 09:30:22 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46358 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726802AbeH0NaV (ORCPT ); Mon, 27 Aug 2018 09:30:21 -0400 Received: by mail-lj1-f196.google.com with SMTP id 203-v6so11777133ljj.13; Mon, 27 Aug 2018 02:44:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XLQFTafYzMFh2BQ1WlYD2Ng2koSEMQyinUqrNanOj7Y=; b=kSpAl3gNIq9o8RDCN2BkG8pFGKbxoj2p/GPKOh9HHVwmrZO/3W/MRDG/Oo09/+4soz 20CHSBvRtdRU459ukQuoxZmNcaEmoLJJ/Fjuvm2LZuEnA7WEdA723Gsfawc4Cw+bk+D6 oNkDxv02i1tPhphYYXAYYfrQIPuIBHe6VCrSx9Fa1wqyV7pORvGV12ANKBFhaFh+6yK0 NsyaTa8lh8meojkuOZXacf3q0a1eYjdVeMHOENfd+XT12L4l6/SQl2X2gmzpjvWlTD78 aUodWb1IZ8/C9u8jX3qe051dCZIMggRrisaz1vp/Eft//qF3ZoSSO9nnExoFeub+6Nxy oIOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=XLQFTafYzMFh2BQ1WlYD2Ng2koSEMQyinUqrNanOj7Y=; b=JONAgyefVKxYS+dTXU10pgyUcqIhayBV9MotkN2i1L2bIoAOY05WhN1U1lQzlmJtpS K1kw8Fgf1zYm4FRMwAO9g/UX0q9qLQCieHTs0t7p8nvbsRfpz4ffTLwimPA6QPp0nO8Y nyhc7qfUSqlEurdz6vLXtGKR77oGnkvaEWrZ3+zYZDoZYwqfXJzB4dKxBGBpBANZkHf/ N8J/BlvvdzaL0V8NTx1WUS10pHHEivnzr6o6b+2KTJtsaBOas822/RjTlY6Te2ptfH1l neFgrStQOY7ZVhfPoWpHU3BS2h5C2nz2l0yTGWMoU6Ghn697drRCOtSa5XgxHGgoiaC7 ZnZQ== X-Gm-Message-State: APzg51BNIRZ4SpmGszSeIeoSWLdrrS2E17Xk1GmjQt6c/TyXq5XFbM/q 81VE5G2WslxJB19H8QPvPCs= X-Received: by 2002:a2e:3313:: with SMTP id d19-v6mr7776800ljc.25.1535363064882; Mon, 27 Aug 2018 02:44:24 -0700 (PDT) Received: from xi.terra (c-74bee655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.190.116]) by smtp.gmail.com with ESMTPSA id g5-v6sm2715016ljg.54.2018.08.27.02.44.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Aug 2018 02:44:24 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1fuE4N-00067H-72; Mon, 27 Aug 2018 11:44:23 +0200 Date: Mon, 27 Aug 2018 11:44:23 +0200 From: Johan Hovold To: Boris Brezillon Cc: Johan Hovold , Rob Herring , Greg Kroah-Hartman , Frank Rowand , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, stable , Nicolas Ferre , Josh Wu Subject: Re: [PATCH v2 5/9] mtd: nand: atmel: fix OF child-node lookup Message-ID: <20180827094423.GA14967@localhost> References: <20180827082153.22537-1-johan@kernel.org> <20180827082153.22537-6-johan@kernel.org> <20180827102820.3abf7291@bbrezillon> <20180827084414.GZ14967@localhost> <20180827104842.26bce912@bbrezillon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180827104842.26bce912@bbrezillon> 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 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. Johan