From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751186AbdBCRTn (ORCPT ); Fri, 3 Feb 2017 12:19:43 -0500 Received: from fllnx210.ext.ti.com ([198.47.19.17]:55575 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881AbdBCRTm (ORCPT ); Fri, 3 Feb 2017 12:19:42 -0500 Subject: Re: [PATCH v3] initramfs: finish fput() before accessing any binary from initramfs To: Andrew Morton , Lokesh Vutla References: <20170201140540.22051-1-lokeshvutla@ti.com> <20170201141213.3cf81a7a3a771ac2b94e8d48@linux-foundation.org> CC: Al Viro , , Linux ARM Mailing List , Sekhar Nori , Nishanth Menon , Muralidharan Karicheri From: Tero Kristo Message-ID: <689e7fdc-8445-2d5f-da2e-116aeb0b9c90@ti.com> Date: Fri, 3 Feb 2017 19:19:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170201141213.3cf81a7a3a771ac2b94e8d48@linux-foundation.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/02/17 00:12, Andrew Morton wrote: > On Wed, 1 Feb 2017 19:35:40 +0530 Lokesh Vutla wrote: > >> commit 4a9d4b024a31 ("switch fput to task_work_add") implements a >> schedule_work() for completing fput(), but did not guarantee calling >> __fput() after unpacking initramfs. Because of this, there is a >> possibility that during boot a driver can see ETXTBSY when it tries >> to load a binary from initramfs as fput() is still pending on that >> binary. This patch makes sure that fput() is completed after unpacking >> initramfs and removes the call to flush_delayed_fput() in kernel_init() >> which happens very late after unpacking initramfs. > > There's not really enough info here for others to be able to decide > which kernel versions need the fix. How serious is the bug? Given > that it's been there for 4 years, I assume "not very"? I think the issue only surfaces with certain timing conditions, and for some reason it has been masked for at least us until we noticed this with 4.9-lts kernel. The same issue was not detected with earlier 4.4-lts kernel. -Tero