Bug 4631 - Failed to compile with CONFIG_RICH_CONTAINER=y and CONFIG_SCHEDSTATS=n
Summary: Failed to compile with CONFIG_RICH_CONTAINER=y and CONFIG_SCHEDSTATS=n
Status: IN_PROGRESS
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: general/others (show other bugs) general/others
Version: 5.10.y-9
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Alierwei
QA Contact: shuming
URL:
Whiteboard:
Keywords: Bugfix
Depends on:
Blocks:
 
Reported: 2023-03-29 10:26 UTC by liusong
Modified: 2024-01-30 15:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description liusong 2023-03-29 10:26:54 UTC
Description of problem:

Config with CONFIG_RICH_CONTAINER set and CONFIG_SCHEDSTATS unset (unselect kernel debuginfo from menuconfig), the compilation failed as:

```
kernel/pid_namespace.o: In function `rich_container_enable':
pid_namespace.c:(.init.text+0x13): undefined reference to `__sched_schedstats'
make: *** [Makefile:1188: vmlinux] Error 1
```

This is introduced by commit e777fc6b981edc10d355a8ff9f1e85786a8ea061. In this commit rich_container_enable() tries to set __sched_schedstats from kernel/pid_namespace.c, but __sched_schedstats won't exist if CONFIG_SCHEDSTATS is not set.

Version-Release number of selected component (if applicable):

5.10.134-12_rc1-217-ge777fc6b981e

How reproducible:

Compile with CONFIG_RICH_CONTAINER set and CONFIG_SCHEDSTATS unset.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info: