Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 825346 - sys-kernel/gentoo-sources-5.15 USE=experimental kernel/sched/alt_core.c:2997:6: error: conflicting types for ‘sched_post_fork’
Summary: sys-kernel/gentoo-sources-5.15 USE=experimental kernel/sched/alt_core.c:2997:...
Status: RESOLVED DUPLICATE of bug 824586
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-20 19:00 UTC by Andrew Udvare
Modified: 2021-11-20 22:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Udvare 2021-11-20 19:00:29 UTC
The patch used with USE=experimental patches in a stub sched_post_fork with the wrong signature. The patch works, but the code will not compile.

https://dev.gentoo.org/~mpagano/genpatches/trunk/5.15/5020_BMQ-and-PDS-io-scheduler-v5.15-r0.patch

Line 3666

It should be:

+void sched_post_fork(struct task_struct *p, struct kernel_clone_args *kargs) {}

Project C has a newer patch: https://gitlab.com/alfredchen/projectc/-/blob/master/5.15/prjc_v5.15-r1.patch

From make V=1 output:

  gcc -Wp,-MMD,kernel/sched/.alt_core.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -march=native -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/latent_entropy_plugin.so -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -DLATENT_ENTROPY_PLUGIN -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -fplugin-arg-randomize_layout_plugin-performance-mode -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86    -DKBUILD_MODFILE='"kernel/sched/alt_core"' -DKBUILD_BASENAME='"alt_core"' -DKBUILD_MODNAME='"alt_core"' -D__KBUILD_MODNAME=kmod_alt_core -c -o kernel/sched/alt_core.o kernel/sched/alt_core.c
kernel/sched/alt_core.c:2997:6: error: conflicting types for ‘sched_post_fork’; have ‘void(struct task_struct *)’
 2997 | void sched_post_fork(struct task_struct *p) {}
      |      ^~~~~~~~~~~~~~~
In file included from ./include/linux/sched/signal.h:9,
                 from ./include/linux/sched/cputime.h:5,
                 from kernel/sched/alt_sched.h:8,
                 from kernel/sched/sched.h:6,
                 from kernel/sched/alt_core.c:18:
./include/linux/sched/task.h:57:13: note: previous declaration of ‘sched_post_fork’ with type ‘void(struct task_struct *, struct kernel_clone_args *)’
   57 | extern void sched_post_fork(struct task_struct *p,
      |             ^~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:277: kernel/sched/alt_core.o] Error 1
make[1]: *** [scripts/Makefile.build:540: kernel/sched] Error 2
make: *** [Makefile:1868: kernel] Error 2
Comment 1 Mike Pagano gentoo-dev 2021-11-20 22:44:35 UTC

*** This bug has been marked as a duplicate of bug 824586 ***