0

I am using initramfs file system along with a kernel image and device tree. I am getting an exception while freeing the memory of the initrd after unpacking it.

The initramfs is unpacked successfully in the kernel boot process, but there is some issue in freeing the memory.

my bootargs: setenv bootargs 'noinitrd init=/sample_exe console=ttySC0,115200 root=/dev/ram0 rw ramdisk_size=16384'

Please find the boot log below:

[    0.175117] Trying to unpack rootfs image as initramfs...
[    0.631972] ##free_initrd initrd_start ffffffc028000040 
[    0.631972] initrd_end ffffffc028d72ea3
[    0.634079] BUG: Bad page state in process swapper/0  pfn:70400
[    0.634089] page:ffffffbdc1c10000 count:0 mapcount:-127 mapping:          
(null) index:0x0
[    0.634093] flags: 0x0()
[    0.634098] page dumped because: nonzero mapcount
[    0.634102] Modules linked in:
[    0.634112] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-yocto-standard #14
[    0.634122] Call trace:
[    0.634139] [<ffffffc0000897f0>] dump_backtrace+0x0/0x180
[    0.634144] [<ffffffc000089984>] show_stack+0x14/0x20
[    0.634153] [<ffffffc00032e300>] dump_stack+0x90/0xc8
[    0.634163] [<ffffffc00014d0c0>] bad_page+0xc8/0x118
[    0.634167] [<ffffffc00014d2ec>] free_pages_prepare+0x1dc/0x248
[    0.634172] [<ffffffc00014f268>] free_hot_cold_page+0x28/0x1b8
[    0.634176] [<ffffffc00014f498>] __free_pages+0x40/0x50
[    0.634180] [<ffffffc00014f534>] free_reserved_area+0x8c/0x110
[    0.634190] [<ffffffc000bff12c>] free_initrd_mem+0x20/0x2c
[    0.634196] [<ffffffc000bfc714>] free_initrd+0x40/0x54
[    0.634201] [<ffffffc000bfcc30>] populate_rootfs+0xf4/0x110
[    0.634206] [<ffffffc000082914>] do_one_initcall+0x8c/0x190
[    0.634211] [<ffffffc000bfaa9c>] kernel_init_freeable+0x148/0x1ec
[    0.634223] [<ffffffc000833b98>] kernel_init+0x10/0xe8
[    0.634228] [<ffffffc000085cd0>] ret_from_fork+0x10/0x40

1 Answer 1

0

My initrd image size is very less compared with RAM. So I retained the initrd image without freeing in kernel using below bootarfs.

set bootargs 'retain_initrd'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .