NERF: initrd freeing causes warning message
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 1.6k
- Forks
- 211
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 6
Description
```
[ 3.487858] Trying to unpack rootfs image as initramfs...
[ 3.780170] ------------[ cut here ]------------
[ 3.785345] WARNING: CPU: 0 PID: 1 at arch/x86/mm/init.c:690 free_init_pages+0x4f/0x92
[ 3.794189] Modules linked in:
[ 3.797613] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G I 4.9.38-heads #0
[ 3.806161] ffffc9000000bdd0 ffffffff8121c1aa 0000000000000000 0000000000000000
[ 3.814457] ffffc9000000be10 ffffffff81062d23 000002b20000be50 ffff880076d73000
[ 3.822752] ffff880076eb9000 ffff880076d73000 ffffffff817074b6 ffff880076eb9000
[ 3.831047] Call Trace:
[ 3.833782] [] dump_stack+0x4d/0x63
[ 3.839524] [] __warn+0xb8/0xd3
[ 3.844871] [] warn_slowpath_null+0x18/0x1a
[ 3.851383] [] free_init_pages+0x4f/0x92
[ 3.857610] [] ? clean_rootfs+0x16e/0x16e
[ 3.863932] [] free_initrd_mem+0x21/0x23
[ 3.870150] [] free_initrd+0x78/0x91
[ 3.875982] [] populate_rootfs+0xf9/0x103
[ 3.882302] [] do_one_initcall+0x99/0x12d
[ 3.888625] [] ? parse_args+0x10f/0x35f
[ 3.894748] [] kernel_init_freeable+0x118/0x199
[ 3.901650] [] ? rest_init+0x6f/0x6f
[ 3.907481] [] kernel_init+0x9/0xeb
[ 3.913222] [] ret_from_fork+0x22/0x30
[ 3.919253] ---[ end trace 0ab4c3e5d828f171 ]---
[ 3.924678] Freeing initrd memory: 1304K (ffff880076d73000 - ffff880076eb9000
)
```
The kernel continues to boot, so it is just noisy on the console.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with arch/x86/mm/init.c at the reported free_init_pages+0x4f warning location, then follow the free_initrd_mem and free_initrd callers in the trace. Reproduce the boot with the initramfs shown in the report and determine why freeing it emits the warning. Done means the kernel still frees the initrd without the console warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100