lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190328014806.36375-1-cai@lca.pw>
Date:   Wed, 27 Mar 2019 21:48:06 -0400
From:   Qian Cai <cai@....pw>
To:     akpm@...ux-foundation.org
Cc:     hch@....de, rppt@...ux.ibm.com, linux-kernel@...r.kernel.org,
        Qian Cai <cai@....pw>
Subject: [PATCH -mmots] initramfs: fix a compilation error

The commit 754006569c54 ("initramfs: cleanup populate_rootfs")
introduced a compilation error with CONFIG_BLK_DEV_RAM != y due to
clean_rootfs() is only declared with CONFIG_BLK_DEV_RAM=y.

init/initramfs.c: In function 'populate_rootfs':
init/initramfs.c:659:3: error: implicit declaration of function
'clean_rootfs'; did you mean 'clean_path'?
[-Werror=implicit-function-declaration]
   clean_rootfs();
   ^~~~~~~~~~~~
   clean_path

Signed-off-by: Qian Cai <cai@....pw>
---
 init/initramfs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/init/initramfs.c b/init/initramfs.c
index 000e88ca08b7..435a428c2af1 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -610,7 +610,11 @@ static void __init clean_rootfs(void)
 	ksys_close(fd);
 	kfree(buf);
 }
-#endif
+#else
+static inline void clean_rootfs(void)
+{
+}
+#endif /* CONFIG_BLK_DEV_RAM */
 
 #ifdef CONFIG_BLK_DEV_RAM
 static void populate_initrd_image(char *err)
-- 
2.17.2 (Apple Git-113)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ