From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node() Date: Sun, 6 Dec 2015 13:49:29 -0800 Message-ID: <5664AD69.6050702@roeck-us.net> References: <1446642770-4681-1-git-send-email-gwshan@linux.vnet.ibm.com> <1446642770-4681-46-git-send-email-gwshan@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Rob Herring , Gavin Shan Cc: linuxppc-dev , "linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Benjamin Herrenschmidt , Michael Ellerman , aik-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org, Bjorn Helgaas , Grant Likely , Pantelis Antoniou , Frank Rowand List-Id: devicetree@vger.kernel.org On 12/06/2015 12:28 PM, Rob Herring wrote: > +Guenter > > On Wed, Nov 4, 2015 at 7:12 AM, Gavin Shan wrote: >> In current implementation, unflatten_dt_node() is called recursively >> to unflatten device nodes in FDT blob. It's stress to limited stack >> capacity. >> >> This avoids calling the function recursively, meaning the device >> nodes are unflattened in one call on unflatten_dt_node(): two arrays >> are introduced to track the parent path size and the device node of >> current level of depth, which will be used by the device node on next >> level of depth to be unflattened. Also, the parameter "poffset" and >> "fpsize" are unused and dropped. > > Do you plan to respin the OF parts at least soon? There's another > problem Guenter found that of_fdt_unflatten_tree is not re-entrant due > to "depth" being static and this series fixes that. So I'd rather > apply this and avoid adding a mutex if possible. > Hi Rob, We see this problem in 4.1, so whatever patch you accept should be back-ported to at least that release. Any idea when this patch will be accepted ? We actively see the problem in our kernel, so I'll need a solution soon. Otherwise I'll have to apply my patch to our kernel and revert it as soon as the 'real' patch has been back-ported. Thanks, Guenter -- 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