From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752580AbdBAM2u (ORCPT ); Wed, 1 Feb 2017 07:28:50 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:33810 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751809AbdBAM2p (ORCPT ); Wed, 1 Feb 2017 07:28:45 -0500 Date: Wed, 1 Feb 2017 12:28:38 +0000 From: Al Viro To: Lokesh Vutla Cc: linux-kernel@vger.kernel.org, Linux ARM Mailing List , Tero Kristo , Sekhar Nori , Nishanth Menon , Muralidharan Karicheri Subject: Re: [PATCH v2] initramfs: finish fput() before accessing any binary from initramfs Message-ID: <20170201122838.GC27291@ZenIV.linux.org.uk> References: <20170124053636.30121-1-lokeshvutla@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170124053636.30121-1-lokeshvutla@ti.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 24, 2017 at 11:06:36AM +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. Umm... Do we want it done in kernel_init(), then? I have no objections against calling it in populate_rootfs(), and it looks like a sane place for that, but I wonder if the old callsite would remain needed after that...