From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755003AbdEFIRP (ORCPT ); Sat, 6 May 2017 04:17:15 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33806 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754695AbdEFIRI (ORCPT ); Sat, 6 May 2017 04:17:08 -0400 Date: Sat, 6 May 2017 17:17:04 +0900 From: Stafford Horne To: Andrei Vagin Cc: LKML , Lokesh Vutla , Al Viro , Andrew Morton Subject: Re: initramfs: Always do fput() and load modules after rootfs populate Message-ID: <20170506081704.GF17317@lianli.shorne-pla.net> References: <20170504124701.727-1-shorne@gmail.com> <20170506070231.GA29268@outlook.office365.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170506070231.GA29268@outlook.office365.com> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 06, 2017 at 12:02:32AM -0700, Andrei Vagin wrote: > Hi, > > I see the following error with this patch: > > init/initramfs.c: In function 'populate_rootfs': > init/initramfs.c:644:2: error: label at end of compound statement > done: > ^ > scripts/Makefile.build:294: recipe for target 'init/initramfs.o' failed > make[1]: *** [init/initramfs.o] Error 1 Ahh, I didnt notice this and none of the build robots reported to us. Sorry about it, the above patch is already merged, so this is not good, Ill get this fixed. Could you give me some info on your compiler? > probably we need something like this: > diff --git a/init/initramfs.c b/init/initramfs.c > index 3a68715..9966c0f 100644 > --- a/init/initramfs.c > +++ b/init/initramfs.c > @@ -641,7 +641,6 @@ static int __init populate_rootfs(void) > sys_close(fd); > free_initrd(); > } > - done: > #else > printk(KERN_INFO "Unpacking initramfs...\n"); > err = unpack_to_rootfs((char *)initrd_start, > @@ -651,6 +650,7 @@ static int __init populate_rootfs(void) > free_initrd(); > #endif > } > +done: > flush_delayed_fput(); > /* > * Try loading default modules from initramfs. This gives > Right, this looks correct for the above error. -Stafford