Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initramfs: Always do fput() and load modules after rootfs populate
In OpenRISC we do not have a bootloader passed initrd, but the built in initramfs does contain the /init and other binaries, including modules. The previous commit 0886551 ("initramfs: finish fput() before accessing any binary from initramfs") made a change to only call fput() if the bootloader initrd was available, this caused intermittent crashes for OpenRISC. This patch changes the fput() to happen unconditionally if any rootfs is loaded. Also, I added some comments to make it a bit more clear why we call unpack_to_rootfs() multiple times. Fixes: 0886551 ("initramfs: finish fput() before accessing any binary from initramfs") Cc: [email protected] Cc: Lokesh Vutla <[email protected]> Cc: Al Viro <[email protected]> Acked-by: Al Viro <[email protected]> Signed-off-by: Stafford Horne <[email protected]>
- Loading branch information