From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH v2 2/2] of: overlay: Fix cleanup order in of_overlay_apply() Date: Mon, 4 Dec 2017 20:25:57 -0600 Message-ID: References: <1512402456-8176-1-git-send-email-geert+renesas@glider.be> <1512402456-8176-3-git-send-email-geert+renesas@glider.be> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Geert Uytterhoeven Cc: Geert Uytterhoeven , Pantelis Antoniou , Frank Rowand , Colin King , Dan Carpenter , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: devicetree@vger.kernel.org On Mon, Dec 4, 2017 at 1:45 PM, Geert Uytterhoeven wrote: > Hi Rob, > > On Mon, Dec 4, 2017 at 8:35 PM, Rob Herring wrote: >> On Mon, Dec 4, 2017 at 9:47 AM, Geert Uytterhoeven >> wrote: >>> The special overlay mutex is taken first, hence it should be released >>> last in the error path. >>> >>> Move "mutex_lock(&of_mutex)" up, as suggested by Frank, as >>> free_overlay_changeset() should be called with that mutex held if any >>> non-trivial cleanup is to be done. >> >> Not holding the of_mutex for of_resolve_phandles is just wrong. >> Without it, a node and new phandle could be added via of_attach_node >> making the max phandle wrong. > > After my patch it's held, so what's the problem? There's no problem. Just highlighting the issue with the prior location is more than it seems from your explanation. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html