openwrt-6.x/include
Christian Marangi 3de1bbd5ae
image: fix race between mkits.sh and mkimage in .itb squashfs generation
With further investigation it was found a race in generating .itb images
that include a RootFS caused by the mkits.sh and the mkimage.

Due to the fact that mkits.sh generates a .pagesync image of the passed
rootfs, it can happen that, concurrently, mkimage can be called at the
same time mkits.sh is creating another .pagesync for the same rootfs.

This cause mkimage to use an half made rootfs.pagesync creating a
corrupted image.

To address this, also protect the mkimage with the same lock used for
mkits.sh preventing any kind of concurrent usage/generation of the
rootfs.pagesync blob

Fixes: 52cc9d82f1 ("kernel: rework Initramfs locking logic")
Link: https://github.com/openwrt/openwrt/pull/20492
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-23 18:14:00 +02:00
..
site
autotools.mk
bpf.mk
cmake.mk
debug.mk
default-packages.mk
depends.mk
device_table.txt
download.mk
feeds.mk
hardened-ld-pie.specs
hardening.mk
host-build.mk
image-commands.mk image: fix race between mkits.sh and mkimage in .itb squashfs generation 2025-10-23 18:14:00 +02:00
image.mk
kernel-build.mk
kernel-defaults.mk
kernel-version.mk
kernel.mk
logo.png
logo.svg
meson.mk
netfilter.mk
nls.mk
openssl-module.mk
optee-os.mk
package-bin.mk
package-defaults.mk build: handle --root feeds script feature 2025-10-20 13:50:15 +02:00
package-dumpinfo.mk
package-pack.mk package: do not sign individual APK packages 2025-10-09 12:52:43 +02:00
package-seccomp.mk
package.mk build: handle --root feeds script feature 2025-10-20 13:50:15 +02:00
prereq-build.mk prereq: use staging_dir's compiler 2025-10-20 00:55:06 +02:00
prereq.mk prereq: use staging_dir's compiler 2025-10-20 00:55:06 +02:00
quilt.mk
rootfs.mk
scan.awk
scan.mk
shell.sh
subdir.mk
target.mk
toolchain-build.mk
toplevel.mk
trusted-firmware-a.mk
u-boot.mk
uclibc++.mk
unpack.mk
verbose.mk
version.mk