mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 58 participants
  • 19274 discussions
[PATCH OLK-5.10] [Huawei] ima: Fix suspicious RCU usage
by GUO Zihua 30 Apr '24

30 Apr '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9KUX7 -------------------------------- Fixed "WARNING: suspicious RCU usage" warning on ima_update_policy_flag. Fixes: bccda6c35b52 ("ima: fix deadlock when traversing \"ima_default_rules\".") Signed-off-by: GUO Zihua <guozihua(a)huawei.com> --- security/integrity/ima/ima_policy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index a9dbfc7143b3..43a5c4754a66 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -759,11 +759,13 @@ void ima_update_policy_flag(void) struct ima_rule_entry *entry; struct list_head *ima_rules_tmp; + rcu_read_lock(); ima_rules_tmp = rcu_dereference(ima_rules); list_for_each_entry_rcu(entry, ima_rules_tmp, list) { if (entry->action & IMA_DO_MASK) ima_policy_flag |= entry->action; } + rcu_read_unlock(); ima_appraise |= (build_ima_appraise | temp_ima_appraise); if (!ima_appraise) -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()
by Zheng Yejian 30 Apr '24

30 Apr '24
maillist inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9KUFO Reference: https://lore.kernel.org/all/20240412135256.1546051-1-zhengyejian1@huawei.co… -------------------------------- Infinite log printing occurs during fuzz test: rc rc1: DViCO FusionHDTV DVB-T USB (LGZ201) as ... ... dvb-usb: schedule remote query interval to 100 msecs. dvb-usb: DViCO FusionHDTV DVB-T USB (LGZ201) successfully initialized ... dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) ... dvb-usb: bulk message failed: -22 (1/0) Looking into the codes, there is a loop in dvb_usb_read_remote_control(), that is in rc_core_dvb_usb_remote_init() create a work that will call dvb_usb_read_remote_control(), and this work will reschedule itself at 'rc_interval' intervals to recursively call dvb_usb_read_remote_control(), see following code snippet: rc_core_dvb_usb_remote_init() { ... INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control); schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); ... } dvb_usb_read_remote_control() { ... err = d->props.rc.core.rc_query(d); if (err) err(...) // Did not return even if query failed schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); } When the infinite log printing occurs, the query callback 'd->props.rc.core.rc_query' is cxusb_rc_query(). And the log is due to the failure of finding a valid 'generic_bulk_ctrl_endpoint' in usb_bulk_msg(), see following code snippet: cxusb_rc_query() { cxusb_ctrl_msg() { dvb_usb_generic_rw() { ret = usb_bulk_msg(d->udev, usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint),...); if (ret) err("bulk message failed: %d (%d/%d)",ret,wlen,actlen); ... } ... } By analyzing the corresponding USB descriptor, it shows that the bNumEndpoints is 0 in its interface descriptor, but the 'generic_bulk_ctrl_endpoint' is 1, that means user don't configure a valid endpoint for 'generic_bulk_ctrl_endpoint', therefore this 'invalid' USB device should be rejected before it calls into dvb_usb_read_remote_control(). To fix it, iiuc, we can add endpoint check in dvb_usb_adapter_init(). Fixes: 786baecfe78f ("[media] dvb-usb: move it to drivers/media/usb/dvb-usb") Signed-off-by: Zheng Yejian <zhengyejian1(a)huawei.com> --- drivers/media/usb/dvb-usb/dvb-usb-init.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/media/usb/dvb-usb/dvb-usb-init.c b/drivers/media/usb/dvb-usb/dvb-usb-init.c index fbf58012becd..48e7b9fb93dd 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-init.c @@ -104,6 +104,14 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs) * sometimes a timeout occurs, this helps */ if (d->props.generic_bulk_ctrl_endpoint != 0) { + ret = usb_pipe_type_check(d->udev, usb_sndbulkpipe(d->udev, + d->props.generic_bulk_ctrl_endpoint)); + if (ret) + goto frontend_init_err; + ret = usb_pipe_type_check(d->udev, usb_rcvbulkpipe(d->udev, + d->props.generic_bulk_ctrl_endpoint)); + if (ret) + goto frontend_init_err; usb_clear_halt(d->udev, usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); usb_clear_halt(d->udev, usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); } -- 2.25.1
2 1
0 0
[PATCH OLK-5.10] media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()
by Zheng Yejian 30 Apr '24

30 Apr '24
maillist inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9KUFO Reference: https://lore.kernel.org/all/20240412135256.1546051-1-zhengyejian1@huawei.co… -------------------------------- Infinite log printing occurs during fuzz test: rc rc1: DViCO FusionHDTV DVB-T USB (LGZ201) as ... ... dvb-usb: schedule remote query interval to 100 msecs. dvb-usb: DViCO FusionHDTV DVB-T USB (LGZ201) successfully initialized ... dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) ... dvb-usb: bulk message failed: -22 (1/0) Looking into the codes, there is a loop in dvb_usb_read_remote_control(), that is in rc_core_dvb_usb_remote_init() create a work that will call dvb_usb_read_remote_control(), and this work will reschedule itself at 'rc_interval' intervals to recursively call dvb_usb_read_remote_control(), see following code snippet: rc_core_dvb_usb_remote_init() { ... INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control); schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); ... } dvb_usb_read_remote_control() { ... err = d->props.rc.core.rc_query(d); if (err) err(...) // Did not return even if query failed schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); } When the infinite log printing occurs, the query callback 'd->props.rc.core.rc_query' is cxusb_rc_query(). And the log is due to the failure of finding a valid 'generic_bulk_ctrl_endpoint' in usb_bulk_msg(), see following code snippet: cxusb_rc_query() { cxusb_ctrl_msg() { dvb_usb_generic_rw() { ret = usb_bulk_msg(d->udev, usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint),...); if (ret) err("bulk message failed: %d (%d/%d)",ret,wlen,actlen); ... } ... } By analyzing the corresponding USB descriptor, it shows that the bNumEndpoints is 0 in its interface descriptor, but the 'generic_bulk_ctrl_endpoint' is 1, that means user don't configure a valid endpoint for 'generic_bulk_ctrl_endpoint', therefore this 'invalid' USB device should be rejected before it calls into dvb_usb_read_remote_control(). To fix it, iiuc, we can add endpoint check in dvb_usb_adapter_init(). Fixes: 786baecfe78f ("[media] dvb-usb: move it to drivers/media/usb/dvb-usb") Signed-off-by: Zheng Yejian <zhengyejian1(a)huawei.com> --- drivers/media/usb/dvb-usb/dvb-usb-init.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/media/usb/dvb-usb/dvb-usb-init.c b/drivers/media/usb/dvb-usb/dvb-usb-init.c index 58eea8ab5477..d8098c110450 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-init.c @@ -104,6 +104,14 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs) * sometimes a timeout occurs, this helps */ if (d->props.generic_bulk_ctrl_endpoint != 0) { + ret = usb_pipe_type_check(d->udev, usb_sndbulkpipe(d->udev, + d->props.generic_bulk_ctrl_endpoint)); + if (ret) + goto frontend_init_err; + ret = usb_pipe_type_check(d->udev, usb_rcvbulkpipe(d->udev, + d->props.generic_bulk_ctrl_endpoint)); + if (ret) + goto frontend_init_err; usb_clear_halt(d->udev, usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); usb_clear_halt(d->udev, usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); } -- 2.25.1
2 1
0 0
[PATCH OLK-6.6] media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()
by Zheng Yejian 30 Apr '24

30 Apr '24
maillist inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9KUFO Reference: https://lore.kernel.org/all/20240412135256.1546051-1-zhengyejian1@huawei.co… -------------------------------- Infinite log printing occurs during fuzz test: rc rc1: DViCO FusionHDTV DVB-T USB (LGZ201) as ... ... dvb-usb: schedule remote query interval to 100 msecs. dvb-usb: DViCO FusionHDTV DVB-T USB (LGZ201) successfully initialized ... dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) ... dvb-usb: bulk message failed: -22 (1/0) Looking into the codes, there is a loop in dvb_usb_read_remote_control(), that is in rc_core_dvb_usb_remote_init() create a work that will call dvb_usb_read_remote_control(), and this work will reschedule itself at 'rc_interval' intervals to recursively call dvb_usb_read_remote_control(), see following code snippet: rc_core_dvb_usb_remote_init() { ... INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control); schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); ... } dvb_usb_read_remote_control() { ... err = d->props.rc.core.rc_query(d); if (err) err(...) // Did not return even if query failed schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); } When the infinite log printing occurs, the query callback 'd->props.rc.core.rc_query' is cxusb_rc_query(). And the log is due to the failure of finding a valid 'generic_bulk_ctrl_endpoint' in usb_bulk_msg(), see following code snippet: cxusb_rc_query() { cxusb_ctrl_msg() { dvb_usb_generic_rw() { ret = usb_bulk_msg(d->udev, usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint),...); if (ret) err("bulk message failed: %d (%d/%d)",ret,wlen,actlen); ... } ... } By analyzing the corresponding USB descriptor, it shows that the bNumEndpoints is 0 in its interface descriptor, but the 'generic_bulk_ctrl_endpoint' is 1, that means user don't configure a valid endpoint for 'generic_bulk_ctrl_endpoint', therefore this 'invalid' USB device should be rejected before it calls into dvb_usb_read_remote_control(). To fix it, iiuc, we can add endpoint check in dvb_usb_adapter_init(). Signed-off-by: Zheng Yejian <zhengyejian1(a)huawei.com> --- drivers/media/usb/dvb-usb/dvb-usb-init.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/media/usb/dvb-usb/dvb-usb-init.c b/drivers/media/usb/dvb-usb/dvb-usb-init.c index fbf58012becd..48e7b9fb93dd 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-init.c @@ -104,6 +104,14 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs) * sometimes a timeout occurs, this helps */ if (d->props.generic_bulk_ctrl_endpoint != 0) { + ret = usb_pipe_type_check(d->udev, usb_sndbulkpipe(d->udev, + d->props.generic_bulk_ctrl_endpoint)); + if (ret) + goto frontend_init_err; + ret = usb_pipe_type_check(d->udev, usb_rcvbulkpipe(d->udev, + d->props.generic_bulk_ctrl_endpoint)); + if (ret) + goto frontend_init_err; usb_clear_halt(d->udev, usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); usb_clear_halt(d->udev, usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); } -- 2.25.1
2 1
0 0
[PATCH OLK-5.10] media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()
by Zheng Yejian 30 Apr '24

30 Apr '24
maillist inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9KUFO Reference: https://lore.kernel.org/all/20240412135256.1546051-1-zhengyejian1@huawei.co… -------------------------------- Infinite log printing occurs during fuzz test: rc rc1: DViCO FusionHDTV DVB-T USB (LGZ201) as ... ... dvb-usb: schedule remote query interval to 100 msecs. dvb-usb: DViCO FusionHDTV DVB-T USB (LGZ201) successfully initialized ... dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) ... dvb-usb: bulk message failed: -22 (1/0) Looking into the codes, there is a loop in dvb_usb_read_remote_control(), that is in rc_core_dvb_usb_remote_init() create a work that will call dvb_usb_read_remote_control(), and this work will reschedule itself at 'rc_interval' intervals to recursively call dvb_usb_read_remote_control(), see following code snippet: rc_core_dvb_usb_remote_init() { ... INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control); schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); ... } dvb_usb_read_remote_control() { ... err = d->props.rc.core.rc_query(d); if (err) err(...) // Did not return even if query failed schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); } When the infinite log printing occurs, the query callback 'd->props.rc.core.rc_query' is cxusb_rc_query(). And the log is due to the failure of finding a valid 'generic_bulk_ctrl_endpoint' in usb_bulk_msg(), see following code snippet: cxusb_rc_query() { cxusb_ctrl_msg() { dvb_usb_generic_rw() { ret = usb_bulk_msg(d->udev, usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint),...); if (ret) err("bulk message failed: %d (%d/%d)",ret,wlen,actlen); ... } ... } By analyzing the corresponding USB descriptor, it shows that the bNumEndpoints is 0 in its interface descriptor, but the 'generic_bulk_ctrl_endpoint' is 1, that means user don't configure a valid endpoint for 'generic_bulk_ctrl_endpoint', therefore this 'invalid' USB device should be rejected before it calls into dvb_usb_read_remote_control(). To fix it, iiuc, we can add endpoint check in dvb_usb_adapter_init(). Signed-off-by: Zheng Yejian <zhengyejian1(a)huawei.com> --- drivers/media/usb/dvb-usb/dvb-usb-init.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/media/usb/dvb-usb/dvb-usb-init.c b/drivers/media/usb/dvb-usb/dvb-usb-init.c index 58eea8ab5477..d8098c110450 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-init.c @@ -104,6 +104,14 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs) * sometimes a timeout occurs, this helps */ if (d->props.generic_bulk_ctrl_endpoint != 0) { + ret = usb_pipe_type_check(d->udev, usb_sndbulkpipe(d->udev, + d->props.generic_bulk_ctrl_endpoint)); + if (ret) + goto frontend_init_err; + ret = usb_pipe_type_check(d->udev, usb_rcvbulkpipe(d->udev, + d->props.generic_bulk_ctrl_endpoint)); + if (ret) + goto frontend_init_err; usb_clear_halt(d->udev, usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); usb_clear_halt(d->udev, usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); } -- 2.25.1
2 1
0 0
[openeuler:openEuler-1.0-LTS 15647/22256] kernel/sched/sparsemask.h:98:17: warning: array subscript 0 is outside array bounds of 'const struct sparsemask_chunk[0]'
by kernel test robot 30 Apr '24

30 Apr '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3c3550371ac3e9d3326c8263a6eb52d3bb0b43a8 commit: bccfa644c1b98b9d6fa102a39a10a1c52811fd0c [15647/22256] sched/fair: Steal work from an overloaded CPU when CPU goes idle config: x86_64-randconfig-003-20240430 (https://download.01.org/0day-ci/archive/20240430/202404300955.dFOHBkZ8-lkp@…) compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240430/202404300955.dFOHBkZ8-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202404300955.dFOHBkZ8-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/sched/fair.c:2548:6: warning: no previous prototype for 'task_numa_work' [-Wmissing-prototypes] 2548 | void task_numa_work(struct callback_head *work) | ^~~~~~~~~~~~~~ kernel/sched/fair.c:2694:6: warning: no previous prototype for 'task_tick_numa' [-Wmissing-prototypes] 2694 | void task_tick_numa(struct rq *rq, struct task_struct *curr) | ^~~~~~~~~~~~~~ kernel/sched/fair.c:3658:6: warning: no previous prototype for 'sync_entity_load_avg' [-Wmissing-prototypes] 3658 | void sync_entity_load_avg(struct sched_entity *se) | ^~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:3671:6: warning: no previous prototype for 'remove_entity_load_avg' [-Wmissing-prototypes] 3671 | void remove_entity_load_avg(struct sched_entity *se) | ^~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c: In function 'update_blocked_averages': kernel/sched/fair.c:7626:14: warning: variable 'done' set but not used [-Wunused-but-set-variable] 7626 | bool done = true; | ^~~~ In function 'group_faults_priv', inlined from 'task_scan_max' at kernel/sched/fair.c:1175:27: kernel/sched/fair.c:1307:37: warning: array subscript <unknown> is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 1307 | faults += ng->faults[task_faults_idx(NUMA_MEM, node, 1)]; | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c: In function 'task_scan_max': kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ In function 'group_faults_shared', inlined from 'task_scan_max' at kernel/sched/fair.c:1174:26: kernel/sched/fair.c:1319:37: warning: array subscript <unknown> is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 1319 | faults += ng->faults[task_faults_idx(NUMA_MEM, node, 0)]; | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c: In function 'task_scan_max': kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ In function 'group_faults_priv', inlined from 'task_scan_start' at kernel/sched/fair.c:1151:27: kernel/sched/fair.c:1307:37: warning: array subscript <unknown> is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 1307 | faults += ng->faults[task_faults_idx(NUMA_MEM, node, 1)]; | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c: In function 'task_scan_start': kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ In function 'group_faults_shared', inlined from 'task_scan_start' at kernel/sched/fair.c:1150:26: kernel/sched/fair.c:1319:37: warning: array subscript <unknown> is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 1319 | faults += ng->faults[task_faults_idx(NUMA_MEM, node, 0)]; | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c: In function 'task_scan_start': kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ In file included from include/linux/bitops.h:19, from include/linux/kernel.h:11, from arch/x86/include/asm/percpu.h:45, from arch/x86/include/asm/current.h:6, from include/linux/sched.h:12, from kernel/sched/sched.h:5, from kernel/sched/fair.c:23: In function 'sparsemask_test_elem', inlined from 'try_steal' at kernel/sched/fair.c:10007:8: kernel/sched/sparsemask.h:53:10: warning: array subscript <unknown> is outside array bounds of 'const struct sparsemask_chunk[0]' [-Warray-bounds=] 53 | (&(mask)->chunks[SMASK_INDEX((mask), (elem))].word) arch/x86/include/asm/bitops.h:341:37: note: in definition of macro 'test_bit' 341 | : variable_test_bit((nr), (addr))) | ^~~~ kernel/sched/sparsemask.h:191:48: note: in expansion of macro 'SMASK_WORD' 191 | return test_bit(SMASK_BIT(mask, elem), SMASK_WORD(mask, elem)); | ^~~~~~~~~~ In file included from kernel/sched/fair.c:24: kernel/sched/sparsemask.h: In function 'try_steal': kernel/sched/sparsemask.h:45:33: note: while referencing 'chunks' 45 | struct sparsemask_chunk chunks[0]; /* embedded array of chunks */ | ^~~~~~ In function 'sparsemask_next', inlined from 'try_steal' at kernel/sched/fair.c:10018:2: kernel/sched/sparsemask.h:98:17: warning: array subscript <unknown> is outside array bounds of 'const struct sparsemask_chunk[0]' [-Warray-bounds=] 98 | chunk = &mask->chunks[_SMASK_INDEX(density, next)]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/sparsemask.h: In function 'try_steal': kernel/sched/sparsemask.h:45:33: note: while referencing 'chunks' 45 | struct sparsemask_chunk chunks[0]; /* embedded array of chunks */ | ^~~~~~ In function 'sparsemask_next', inlined from 'try_steal' at kernel/sched/fair.c:10018:2: >> kernel/sched/sparsemask.h:98:17: warning: array subscript 0 is outside array bounds of 'const struct sparsemask_chunk[0]' [-Warray-bounds=] 98 | chunk = &mask->chunks[_SMASK_INDEX(density, next)]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/sparsemask.h: In function 'try_steal': kernel/sched/sparsemask.h:45:33: note: while referencing 'chunks' 45 | struct sparsemask_chunk chunks[0]; /* embedded array of chunks */ | ^~~~~~ In function 'sparsemask_next', inlined from 'try_steal' at kernel/sched/fair.c:10018:2: kernel/sched/sparsemask.h:98:30: warning: array subscript <unknown> is outside array bounds of 'const struct sparsemask_chunk[0]' [-Warray-bounds=] 98 | chunk = &mask->chunks[_SMASK_INDEX(density, next)]; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/sparsemask.h: In function 'try_steal': kernel/sched/sparsemask.h:45:33: note: while referencing 'chunks' 45 | struct sparsemask_chunk chunks[0]; /* embedded array of chunks */ | ^~~~~~ kernel/sched/fair.c: In function 'task_numa_group': kernel/sched/fair.c:2335:36: warning: array subscript i is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 2335 | grp->faults[i] = p->numa_faults[i]; | ~~~~~~~~~~~^~~ kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ kernel/sched/fair.c:2393:31: warning: array subscript i is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 2393 | my_grp->faults[i] -= p->numa_faults[i]; | ~~~~~~~~~~~~~~^~~ kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ kernel/sched/fair.c:2393:31: warning: array subscript i is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 2393 | my_grp->faults[i] -= p->numa_faults[i]; | ~~~~~~~~~~~~~~^~~ kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ kernel/sched/fair.c:2394:28: warning: array subscript i is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 2394 | grp->faults[i] += p->numa_faults[i]; | ~~~~~~~~~~~^~~ kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ kernel/sched/fair.c:2394:28: warning: array subscript i is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 2394 | grp->faults[i] += p->numa_faults[i]; | ~~~~~~~~~~~^~~ kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ In function 'sparsemask_clear_elem', inlined from 'overload_clear.part.0' at kernel/sched/fair.c:3834:3: kernel/sched/sparsemask.h:53:10: warning: array subscript <unknown> is outside array bounds of 'struct sparsemask_chunk[0]' [-Warray-bounds=] 53 | (&(mask)->chunks[SMASK_INDEX((mask), (elem))].word) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/sparsemask.h:186:41: note: in expansion of macro 'SMASK_WORD' 186 | clear_bit(SMASK_BIT(dst, elem), SMASK_WORD(dst, elem)); | ^~~~~~~~~~ kernel/sched/sparsemask.h: In function 'overload_clear.part.0': kernel/sched/sparsemask.h:45:33: note: while referencing 'chunks' 45 | struct sparsemask_chunk chunks[0]; /* embedded array of chunks */ | ^~~~~~ In function 'group_faults', inlined from 'score_nearby_nodes.part.0' at kernel/sched/fair.c:1381:13: kernel/sched/fair.c:1291:26: warning: array subscript <unknown> is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 1291 | return ng->faults[task_faults_idx(NUMA_MEM, nid, 0)] + | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c: In function 'score_nearby_nodes.part.0': kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ In function 'group_faults', inlined from 'score_nearby_nodes.part.0' at kernel/sched/fair.c:1381:13: kernel/sched/fair.c:1292:27: warning: array subscript <unknown> is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 1292 | ng->faults[task_faults_idx(NUMA_MEM, nid, 1)]; | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c: In function 'score_nearby_nodes.part.0': kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ In function 'group_faults', inlined from 'preferred_group_nid' at kernel/sched/fair.c:2161:16: kernel/sched/fair.c:1291:26: warning: array subscript <unknown> is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 1291 | return ng->faults[task_faults_idx(NUMA_MEM, nid, 0)] + | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c: In function 'preferred_group_nid': kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ In function 'group_faults', inlined from 'preferred_group_nid' at kernel/sched/fair.c:2161:16: kernel/sched/fair.c:1292:27: warning: array subscript <unknown> is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 1292 | ng->faults[task_faults_idx(NUMA_MEM, nid, 1)]; | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c: In function 'preferred_group_nid': kernel/sched/fair.c:1083:23: note: while referencing 'faults' 1083 | unsigned long faults[0]; | ^~~~~~ In function 'group_faults', inlined from 'group_weight' at kernel/sched/fair.c:1441:11, inlined from 'preferred_group_nid' at kernel/sched/fair.c:2125:12: kernel/sched/fair.c:1291:26: warning: array subscript <unknown> is outside array bounds of 'long unsigned int[0]' [-Warray-bounds=] 1291 | return ng->faults[task_faults_idx(NUMA_MEM, nid, 0)] + | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +98 kernel/sched/sparsemask.h 6866be5a3aff4b Steve Sistare 2021-04-14 47 6866be5a3aff4b Steve Sistare 2021-04-14 48 #define _SMASK_INDEX(density, elem) ((elem) >> (density)) 6866be5a3aff4b Steve Sistare 2021-04-14 49 #define _SMASK_BIT(density, elem) ((elem) & ((1U << (density)) - 1U)) 6866be5a3aff4b Steve Sistare 2021-04-14 50 #define SMASK_INDEX(mask, elem) _SMASK_INDEX((mask)->density, elem) 6866be5a3aff4b Steve Sistare 2021-04-14 51 #define SMASK_BIT(mask, elem) _SMASK_BIT((mask)->density, elem) 6866be5a3aff4b Steve Sistare 2021-04-14 52 #define SMASK_WORD(mask, elem) \ 6866be5a3aff4b Steve Sistare 2021-04-14 53 (&(mask)->chunks[SMASK_INDEX((mask), (elem))].word) 6866be5a3aff4b Steve Sistare 2021-04-14 54 6866be5a3aff4b Steve Sistare 2021-04-14 55 /* 6866be5a3aff4b Steve Sistare 2021-04-14 56 * sparsemask_next() - Return the next one bit in a bitmap, starting at a 6866be5a3aff4b Steve Sistare 2021-04-14 57 * specified position and wrapping from the last bit to the first, up to but 6866be5a3aff4b Steve Sistare 2021-04-14 58 * not including a specified origin. This is a helper, so do not call it 6866be5a3aff4b Steve Sistare 2021-04-14 59 * directly. 6866be5a3aff4b Steve Sistare 2021-04-14 60 * 6866be5a3aff4b Steve Sistare 2021-04-14 61 * @mask: Bitmap to search. 6866be5a3aff4b Steve Sistare 2021-04-14 62 * @origin: Origin. 6866be5a3aff4b Steve Sistare 2021-04-14 63 * @prev: Previous bit. Start search after this bit number. 6866be5a3aff4b Steve Sistare 2021-04-14 64 * If -1, start search at @origin. 6866be5a3aff4b Steve Sistare 2021-04-14 65 * 6866be5a3aff4b Steve Sistare 2021-04-14 66 * Return: the bit number, else mask->nelems if no bits are set in the range. 6866be5a3aff4b Steve Sistare 2021-04-14 67 */ 6866be5a3aff4b Steve Sistare 2021-04-14 68 static inline int 6866be5a3aff4b Steve Sistare 2021-04-14 69 sparsemask_next(const struct sparsemask *mask, int origin, int prev) 6866be5a3aff4b Steve Sistare 2021-04-14 70 { 6866be5a3aff4b Steve Sistare 2021-04-14 71 int density = mask->density; 6866be5a3aff4b Steve Sistare 2021-04-14 72 int bits_per_word = 1U << density; 6866be5a3aff4b Steve Sistare 2021-04-14 73 const struct sparsemask_chunk *chunk; 6866be5a3aff4b Steve Sistare 2021-04-14 74 int nelems = mask->nelems; 6866be5a3aff4b Steve Sistare 2021-04-14 75 int next, bit, nbits; 6866be5a3aff4b Steve Sistare 2021-04-14 76 unsigned long word; 6866be5a3aff4b Steve Sistare 2021-04-14 77 6866be5a3aff4b Steve Sistare 2021-04-14 78 /* Calculate number of bits to be searched. */ 6866be5a3aff4b Steve Sistare 2021-04-14 79 if (prev == -1) { 6866be5a3aff4b Steve Sistare 2021-04-14 80 nbits = nelems; 6866be5a3aff4b Steve Sistare 2021-04-14 81 next = origin; 6866be5a3aff4b Steve Sistare 2021-04-14 82 } else if (prev < origin) { 6866be5a3aff4b Steve Sistare 2021-04-14 83 nbits = origin - prev; 6866be5a3aff4b Steve Sistare 2021-04-14 84 next = prev + 1; 6866be5a3aff4b Steve Sistare 2021-04-14 85 } else { 6866be5a3aff4b Steve Sistare 2021-04-14 86 nbits = nelems - prev + origin - 1; 6866be5a3aff4b Steve Sistare 2021-04-14 87 next = prev + 1; 6866be5a3aff4b Steve Sistare 2021-04-14 88 } 6866be5a3aff4b Steve Sistare 2021-04-14 89 6866be5a3aff4b Steve Sistare 2021-04-14 90 if (unlikely(next >= nelems)) 6866be5a3aff4b Steve Sistare 2021-04-14 91 return nelems; 6866be5a3aff4b Steve Sistare 2021-04-14 92 6866be5a3aff4b Steve Sistare 2021-04-14 93 /* 6866be5a3aff4b Steve Sistare 2021-04-14 94 * Fetch and adjust first word. Clear word bits below @next, and round 6866be5a3aff4b Steve Sistare 2021-04-14 95 * @next down to @bits_per_word boundary because later ffs will add 6866be5a3aff4b Steve Sistare 2021-04-14 96 * those bits back. 6866be5a3aff4b Steve Sistare 2021-04-14 97 */ 6866be5a3aff4b Steve Sistare 2021-04-14 @98 chunk = &mask->chunks[_SMASK_INDEX(density, next)]; 6866be5a3aff4b Steve Sistare 2021-04-14 99 bit = _SMASK_BIT(density, next); 6866be5a3aff4b Steve Sistare 2021-04-14 100 word = chunk->word & (~0UL << bit); 6866be5a3aff4b Steve Sistare 2021-04-14 101 next -= bit; 6866be5a3aff4b Steve Sistare 2021-04-14 102 nbits += bit; 6866be5a3aff4b Steve Sistare 2021-04-14 103 6866be5a3aff4b Steve Sistare 2021-04-14 104 while (!word) { 6866be5a3aff4b Steve Sistare 2021-04-14 105 next += bits_per_word; 6866be5a3aff4b Steve Sistare 2021-04-14 106 nbits -= bits_per_word; 6866be5a3aff4b Steve Sistare 2021-04-14 107 if (nbits <= 0) 6866be5a3aff4b Steve Sistare 2021-04-14 108 return nelems; 6866be5a3aff4b Steve Sistare 2021-04-14 109 6866be5a3aff4b Steve Sistare 2021-04-14 110 if (next >= nelems) { 6866be5a3aff4b Steve Sistare 2021-04-14 111 chunk = mask->chunks; 6866be5a3aff4b Steve Sistare 2021-04-14 112 nbits -= (next - nelems); 6866be5a3aff4b Steve Sistare 2021-04-14 113 next = 0; 6866be5a3aff4b Steve Sistare 2021-04-14 114 } else { 6866be5a3aff4b Steve Sistare 2021-04-14 115 chunk++; 6866be5a3aff4b Steve Sistare 2021-04-14 116 } 6866be5a3aff4b Steve Sistare 2021-04-14 117 word = chunk->word; 6866be5a3aff4b Steve Sistare 2021-04-14 118 } 6866be5a3aff4b Steve Sistare 2021-04-14 119 6866be5a3aff4b Steve Sistare 2021-04-14 120 next += __ffs(word); 6866be5a3aff4b Steve Sistare 2021-04-14 121 if (next >= origin && prev != -1) 6866be5a3aff4b Steve Sistare 2021-04-14 122 return nelems; 6866be5a3aff4b Steve Sistare 2021-04-14 123 return next; 6866be5a3aff4b Steve Sistare 2021-04-14 124 } 6866be5a3aff4b Steve Sistare 2021-04-14 125 :::::: The code at line 98 was first introduced by commit :::::: 6866be5a3aff4bbd949059927d8f8790be53e3dd sched: Provide sparsemask, a reduced contention bitmap :::::: TO: Steve Sistare <steven.sistare(a)oracle.com> :::::: CC: Cheng Jian <cj.chengjian(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10] BUILD SUCCESS 25d9fa98bac87f2cbc5868182135639be8234ad2
by kernel test robot 30 Apr '24

30 Apr '24
tree/branch: https://gitee.com/openeuler/kernel.git OLK-5.10 branch HEAD: 25d9fa98bac87f2cbc5868182135639be8234ad2 !6755 binder: check offset alignment in binder_get_object() Warning ids grouped by kconfigs: clang_recent_errors |-- arm64-allyesconfig | |-- Documentation-devicetree-bindings-arm-cpu.yaml:properties:capacity-dmips-mhz:ref-should-not-be-valid-under-const:ref | |-- Documentation-devicetree-bindings-arm-cpu.yaml:title:ARM-CPUs-bindings-should-not-be-valid-under-pattern:(-Bb-inding-Ss-chema) | |-- Documentation-devicetree-bindings-arm-cpus.yaml:examples:cpus-arm-pbha-performance-only-bits-arm-pbha-no-aliases-bits-ncpu-device_type-cpu-compatible-arm-cortex-a57-...-n-is-not-of-type-array | |-- Documentation-devicetree-bindings-arm-cpus.yaml:maintainers-is-a-required-property | |-- description:Display-controller-reference-clock-source-is-not-of-type-object-boolean | |-- description:Display-controller-reference-clock-source-is-too-short | |-- description:Offset-and-length-of-the-memory-mapped-registers-is-too-short | |-- items-is-not-one-of-type-description-dependencies-dependentRequired-dependentSchemas-properties-patternProperties-additionalProperties-unevaluatedProperties-deprecated-required-not-allOf-anyOf-oneOf-r | `-- minItems-is-not-one-of-type-description-dependencies-dependentRequired-dependentSchemas-properties-patternProperties-additionalProperties-unevaluatedProperties-deprecated-required-not-allOf-anyOf-oneO `-- x86_64-allnoconfig `-- drivers-net-ethernet-mucse-rnpm-rnpm_common.h:linux-version.h-not-needed. elapsed time: 741m configs tested: 35 configs skipped: 150 The following configs have been built successfully. More configs may be tested in the coming days. tested configs: arm64 allmodconfig clang arm64 allnoconfig gcc arm64 defconfig gcc arm64 randconfig-001-20240429 clang arm64 randconfig-002-20240429 gcc arm64 randconfig-003-20240429 clang arm64 randconfig-004-20240429 clang x86_64 allnoconfig clang x86_64 allyesconfig clang x86_64 buildonly-randconfig-001-20240430 gcc x86_64 buildonly-randconfig-002-20240430 clang x86_64 buildonly-randconfig-003-20240430 clang x86_64 buildonly-randconfig-004-20240430 clang x86_64 buildonly-randconfig-005-20240430 clang x86_64 buildonly-randconfig-006-20240430 clang x86_64 defconfig gcc x86_64 randconfig-001-20240430 clang x86_64 randconfig-002-20240430 clang x86_64 randconfig-003-20240430 gcc x86_64 randconfig-004-20240430 gcc x86_64 randconfig-005-20240430 gcc x86_64 randconfig-006-20240430 clang x86_64 randconfig-011-20240430 clang x86_64 randconfig-012-20240430 clang x86_64 randconfig-013-20240430 gcc x86_64 randconfig-014-20240430 clang x86_64 randconfig-015-20240430 clang x86_64 randconfig-016-20240430 clang x86_64 randconfig-071-20240430 clang x86_64 randconfig-072-20240430 clang x86_64 randconfig-073-20240430 clang x86_64 randconfig-074-20240430 clang x86_64 randconfig-075-20240430 gcc x86_64 randconfig-076-20240430 clang x86_64 rhel-8.3-rust clang -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS] BUILD SUCCESS 3c3550371ac3e9d3326c8263a6eb52d3bb0b43a8
by kernel test robot 30 Apr '24

30 Apr '24
tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS branch HEAD: 3c3550371ac3e9d3326c8263a6eb52d3bb0b43a8 !6745 PCI/IOV: Improve performance of creating VFs concurrently Unverified Warning (likely false positive, please contact us if interested): drivers/block/loop.c:1338 loop_set_status() warn: inconsistent returns '&loop_ctl_mutex'. Warning ids grouped by kconfigs: gcc_recent_errors |-- x86_64-defconfig | |-- include-linux-list.h:warning:array-subscript-pfo_ret__-is-outside-array-bounds-of-struct-plist_node | |-- include-linux-plist.h:warning:array-subscript-pfo_ret__-is-outside-array-bounds-of-struct-plist_node | `-- mm-swapfile.c:warning:array-subscript-pfo_ret__-is-outside-array-bounds-of-struct-plist_node |-- x86_64-randconfig-003-20240430 | |-- include-linux-compiler.h:warning:array-subscript-index-is-outside-array-bounds-of-u32-aka-unsigned-int | `-- include-linux-compiler.h:warning:array-subscript-unknown-is-outside-array-bounds-of-const-u32-aka-const-unsigned-int |-- x86_64-randconfig-004-20240430 | |-- include-linux-compiler.h:warning:array-subscript-index-is-outside-array-bounds-of-u32-aka-unsigned-int | `-- include-linux-compiler.h:warning:array-subscript-unknown-is-outside-array-bounds-of-const-u32-aka-const-unsigned-int |-- x86_64-randconfig-005-20240430 | |-- include-linux-spinlock.h:warning:array-subscript-is-outside-array-bounds-of-struct-small_page_pool | |-- mm-hugetlb.c:warning:array-subscript-is-outside-array-bounds-of-struct-small_page_pool | `-- mm-memcontrol.c:warning:array-subscript-is-outside-array-bounds-of-struct-small_page_pool |-- x86_64-randconfig-122-20240430 | |-- drivers-pci-controller-hisi-pcie-customer-hisi_pcie_cae.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-to-got-void | |-- drivers-pci-rom.c:sparse:sparse:incorrect-type-in-return-expression-(different-address-spaces)-expected-void-noderef-asn-got-void | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-long-long-noderef-usertype-asn-off_in-got-long-long-usertype-assigned-poff_in | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-long-long-noderef-usertype-asn-off_out-got-long-long-usertype-assigned-poff_out | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-assignment-(different-address-spaces)-expected-struct-file-assigned-file-got-struct-file-noderef-asn | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-return-expression-(different-address-spaces)-expected-void-noderef-asn-got-struct-io_buffer-assigned-kbuf | |-- kernel-cgroup-cgroup.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-struct-cgroup_subsys_state-css-got-struct-cgroup_subsys_state-noderef-asn | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-got-int-noderef-pmu_disable_count | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-got-struct-perf_cpu_context-noderef-pmu_cpu_context | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-initializer-(different-address-spaces)-expected-void-const-noderef-asn-got-int | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-initializer-(different-address-spaces)-expected-void-const-noderef-asn-got-struct-perf_cpu_context | `-- net-ipv4-arp.c:sparse:sparse:incompatible-types-in-comparison-expression-(different-type-sizes): `-- x86_64-randconfig-123-20240430 |-- drivers-pci-controller-hisi-pcie-customer-hisi_pcie_cae.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-to-got-void |-- drivers-pci-rom.c:sparse:sparse:incorrect-type-in-return-expression-(different-address-spaces)-expected-void-noderef-asn-got-void |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-long-long-noderef-usertype-asn-off_in-got-long-long-usertype-assigned-poff_in |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-long-long-noderef-usertype-asn-off_out-got-long-long-usertype-assigned-poff_out |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-assignment-(different-address-spaces)-expected-struct-file-assigned-file-got-struct-file-noderef-asn |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-return-expression-(different-address-spaces)-expected-void-noderef-asn-got-struct-io_buffer-assigned-kbuf |-- kernel-cgroup-cgroup.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-struct-cgroup_subsys_state-css-got-struct-cgroup_subsys_state-noderef-asn |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-got-int-noderef-pmu_disable_count |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-got-struct-perf_cpu_context-noderef-pmu_cpu_context |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-initializer-(different-address-spaces)-expected-void-const-noderef-asn-got-int |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-initializer-(different-address-spaces)-expected-void-const-noderef-asn-got-struct-perf_cpu_context `-- net-ipv4-arp.c:sparse:sparse:incompatible-types-in-comparison-expression-(different-type-sizes): clang_recent_errors |-- x86_64-allyesconfig | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-buildonly-randconfig-003-20240430 | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-buildonly-randconfig-005-20240430 | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-randconfig-001-20240430 | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-randconfig-002-20240430 | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-randconfig-006-20240430 | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-randconfig-011-20240430 | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-randconfig-012-20240430 | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-randconfig-014-20240430 | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-randconfig-101-20240430 | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-randconfig-121-20240430 | |-- drivers-md-bcache-request.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-const-noderef-asn-from-got-struct-set_bcache_status | |-- drivers-md-bcache-request.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-to-got-struct-get_bcache_status | |-- drivers-pci-controller-hisi-pcie-customer-hisi_pcie_cae.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-to-got-void | |-- drivers-pci-rom.c:sparse:sparse:incorrect-type-in-return-expression-(different-address-spaces)-expected-void-noderef-asn-got-void | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-long-long-noderef-usertype-asn-off_in-got-long-long-usertype-assigned-poff_in | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-long-long-noderef-usertype-asn-off_out-got-long-long-usertype-assigned-poff_out | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-assignment-(different-address-spaces)-expected-struct-file-assigned-file-got-struct-file-noderef-asn | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-return-expression-(different-address-spaces)-expected-void-noderef-asn-got-struct-io_buffer-assigned-kbuf | |-- kernel-cgroup-cgroup.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-struct-cgroup_subsys_state-css-got-struct-cgroup_subsys_state-noderef-asn | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-got-int-noderef-pmu_disable_count | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-got-struct-perf_cpu_context-noderef-pmu_cpu_context | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-initializer-(different-address-spaces)-expected-void-const-noderef-asn-got-int | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-initializer-(different-address-spaces)-expected-void-const-noderef-asn-got-struct-perf_cpu_context | |-- net-ipv4-arp.c:sparse:sparse:incompatible-types-in-comparison-expression-(different-type-sizes): | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-randconfig-161-20240430 | |-- drivers-block-loop.c-loop_set_status()-warn:inconsistent-returns-loop_ctl_mutex-. | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) |-- x86_64-randconfig-r123-20240430 | |-- drivers-pci-controller-hisi-pcie-customer-hisi_pcie_cae.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-to-got-void | |-- drivers-pci-rom.c:sparse:sparse:incorrect-type-in-return-expression-(different-address-spaces)-expected-void-noderef-asn-got-void | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-long-long-noderef-usertype-asn-off_in-got-long-long-usertype-assigned-poff_in | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-long-long-noderef-usertype-asn-off_out-got-long-long-usertype-assigned-poff_out | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-assignment-(different-address-spaces)-expected-struct-file-assigned-file-got-struct-file-noderef-asn | |-- fs-io_uring.c:sparse:sparse:incorrect-type-in-return-expression-(different-address-spaces)-expected-void-noderef-asn-got-struct-io_buffer-assigned-kbuf | |-- fs-proc-etmem_scan.c:sparse:sparse:incorrect-type-in-assignment-(different-address-spaces)-expected-void-noderef-asn-buf-got-void-buf | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-got-int-noderef-pmu_disable_count | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-asn-got-struct-perf_cpu_context-noderef-pmu_cpu_context | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-initializer-(different-address-spaces)-expected-void-const-noderef-asn-got-int | |-- kernel-events-core.c:sparse:sparse:incorrect-type-in-initializer-(different-address-spaces)-expected-void-const-noderef-asn-got-struct-perf_cpu_context | |-- net-ipv4-arp.c:sparse:sparse:incompatible-types-in-comparison-expression-(different-type-sizes): | `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) `-- x86_64-rhel-8.3-rust `-- net-ipv4-arp.c:warning:comparison-of-distinct-pointer-types-(-typeof-(dev-addr_len)-(aka-unsigned-char-)-and-typeof-(sizeof-(r-arp_ha.sa_data))-(aka-unsigned-long-)) elapsed time: 739m configs tested: 26 configs skipped: 148 The following configs have been built successfully. More configs may be tested in the coming days. tested configs: arm64 allmodconfig gcc arm64 allnoconfig gcc arm64 defconfig gcc arm64 randconfig-001-20240429 gcc arm64 randconfig-002-20240429 gcc arm64 randconfig-003-20240429 gcc x86_64 allnoconfig clang x86_64 allyesconfig clang x86_64 buildonly-randconfig-001-20240430 gcc x86_64 buildonly-randconfig-002-20240430 clang x86_64 buildonly-randconfig-003-20240430 clang x86_64 buildonly-randconfig-004-20240430 clang x86_64 buildonly-randconfig-005-20240430 clang x86_64 buildonly-randconfig-006-20240430 clang x86_64 defconfig gcc x86_64 randconfig-001-20240430 clang x86_64 randconfig-002-20240430 clang x86_64 randconfig-003-20240430 gcc x86_64 randconfig-004-20240430 gcc x86_64 randconfig-005-20240430 gcc x86_64 randconfig-006-20240430 clang x86_64 randconfig-011-20240430 clang x86_64 randconfig-012-20240430 clang x86_64 randconfig-013-20240430 gcc x86_64 randconfig-014-20240430 clang x86_64 rhel-8.3-rust clang -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2552/7643] kernel/sched/fair.c:314:15: error: use of undeclared identifier 'hundred_thousand'
by kernel test robot 30 Apr '24

30 Apr '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 3fd472966bcc21f40dc20bb47c7ad18392fbec05 commit: f7c232d3e20a69b46e53da221ba3cbac0fa68a0d [2552/7643] smart_grid: introduce smart_grid_strategy_ctrl sysctl config: x86_64-randconfig-r123-20240430 (https://download.01.org/0day-ci/archive/20240430/202404300812.EAGGykdR-lkp@…) compiler: clang version 18.1.4 (https://github.com/llvm/llvm-project e6c3289804a67ea0bb6a86fadbe454dd93b8d855) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240430/202404300812.EAGGykdR-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202404300812.EAGGykdR-lkp@intel.com/ All errors (new ones prefixed by >>): >> kernel/sched/fair.c:314:15: error: use of undeclared identifier 'hundred_thousand' 314 | .extra2 = &hundred_thousand, | ^ >> kernel/sched/fair.c:322:2: error: invalid application of 'sizeof' to an incomplete type 'struct ctl_table[]' 322 | register_sysctl_init("kernel", sched_fair_sysctls); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/sysctl.h:241:46: note: expanded from macro 'register_sysctl_init' 241 | __register_sysctl_init(path, table, #table, ARRAY_SIZE(table)) | ^~~~~~~~~~~~~~~~~ include/linux/kernel.h:57:32: note: expanded from macro 'ARRAY_SIZE' 57 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~ kernel/sched/fair.c:7104:6: warning: no previous prototype for function 'free_affinity_domains' [-Wmissing-prototypes] 7104 | void free_affinity_domains(struct affinity_domain *ad) | ^ kernel/sched/fair.c:7104:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 7104 | void free_affinity_domains(struct affinity_domain *ad) | ^ | static 1 warning and 2 errors generated. vim +/hundred_thousand +314 kernel/sched/fair.c 216 217 #ifdef CONFIG_SYSCTL 218 static struct ctl_table sched_fair_sysctls[] = { 219 { 220 .procname = "sched_child_runs_first", 221 .data = &sysctl_sched_child_runs_first, 222 .maxlen = sizeof(unsigned int), 223 .mode = 0644, 224 .proc_handler = proc_dointvec, 225 }, 226 #ifdef CONFIG_CFS_BANDWIDTH 227 { 228 .procname = "sched_cfs_bandwidth_slice_us", 229 .data = &sysctl_sched_cfs_bandwidth_slice, 230 .maxlen = sizeof(unsigned int), 231 .mode = 0644, 232 .proc_handler = proc_dointvec_minmax, 233 .extra1 = SYSCTL_ONE, 234 }, 235 #endif 236 #ifdef CONFIG_NUMA_BALANCING 237 { 238 .procname = "numa_balancing_promote_rate_limit_MBps", 239 .data = &sysctl_numa_balancing_promote_rate_limit, 240 .maxlen = sizeof(unsigned int), 241 .mode = 0644, 242 .proc_handler = proc_dointvec_minmax, 243 .extra1 = SYSCTL_ZERO, 244 }, 245 #endif /* CONFIG_NUMA_BALANCING */ 246 #ifdef CONFIG_QOS_SCHED 247 { 248 .procname = "qos_overload_detect_period_ms", 249 .data = &sysctl_overload_detect_period, 250 .maxlen = sizeof(unsigned int), 251 .mode = 0644, 252 .proc_handler = proc_dointvec_minmax, 253 .extra1 = SYSCTL_ONE_HUNDRED, 254 .extra2 = &hundred_thousand, 255 }, 256 { 257 .procname = "qos_offline_wait_interval_ms", 258 .data = &sysctl_offline_wait_interval, 259 .maxlen = sizeof(unsigned int), 260 .mode = 0644, 261 .proc_handler = proc_dointvec_minmax, 262 .extra1 = SYSCTL_ONE_HUNDRED, 263 .extra2 = &one_thousand, 264 }, 265 #endif 266 #ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY 267 { 268 .procname = "sched_util_low_pct", 269 .data = &sysctl_sched_util_low_pct, 270 .maxlen = sizeof(sysctl_sched_util_low_pct), 271 .mode = 0644, 272 .proc_handler = proc_dointvec_minmax, 273 .extra1 = SYSCTL_ZERO, 274 .extra2 = SYSCTL_ONE_HUNDRED, 275 }, 276 #endif 277 #ifdef CONFIG_QOS_SCHED_PRIO_LB 278 { 279 .procname = "sched_prio_load_balance_enabled", 280 .data = &sysctl_sched_prio_load_balance_enabled, 281 .maxlen = sizeof(unsigned int), 282 .mode = 0644, 283 .proc_handler = proc_dointvec_minmax, 284 .extra1 = SYSCTL_ZERO, 285 .extra2 = SYSCTL_ONE, 286 }, 287 #endif 288 #ifdef CONFIG_QOS_SCHED_MULTILEVEL 289 { 290 .procname = "qos_level_weights", 291 .data = &sysctl_qos_level_weights, 292 .maxlen = 5*sizeof(int), 293 .mode = 0644, 294 .proc_handler = proc_dointvec, 295 }, 296 #endif 297 #ifdef CONFIG_QOS_SCHED_SMART_GRID 298 { 299 .procname = "smart_grid_strategy_ctrl", 300 .data = &sysctl_smart_grid_strategy_ctrl, 301 .maxlen = sizeof(unsigned int), 302 .mode = 0644, 303 .proc_handler = proc_dointvec_minmax, 304 .extra1 = SYSCTL_ZERO, 305 .extra2 = SYSCTL_ONE, 306 }, 307 { 308 .procname = "affinity_adjust_delay_ms", 309 .data = &sysctl_affinity_adjust_delay_ms, 310 .maxlen = sizeof(unsigned int), 311 .mode = 0644, 312 .proc_handler = proc_dointvec_minmax, 313 .extra1 = SYSCTL_ZERO, > 314 .extra2 = &hundred_thousand, 315 }, 316 #endif 317 {} 318 }; 319 320 static int __init sched_fair_sysctl_init(void) 321 { > 322 register_sysctl_init("kernel", sched_fair_sysctls); 323 return 0; 324 } 325 late_initcall(sched_fair_sysctl_init); 326 #endif 327 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 20217/22256] mm/hugetlb.c:3967:41: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]'
by kernel test robot 30 Apr '24

30 Apr '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3c3550371ac3e9d3326c8263a6eb52d3bb0b43a8 commit: 0bc0d0d57edacd59ebe38d05ad9c4b2bc185aa51 [20217/22256] dhugetlb: backport dynamic hugetlb feature config: x86_64-randconfig-005-20240430 (https://download.01.org/0day-ci/archive/20240430/202404300835.ONBQ5gRx-lkp@…) compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240430/202404300835.ONBQ5gRx-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202404300835.ONBQ5gRx-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from arch/x86/include/asm/bug.h:83, from include/linux/bug.h:5, from include/linux/mmdebug.h:5, from include/linux/mm.h:10, from mm/hugetlb.c:7: mm/hugetlb.c: In function 'dhugetlb_acct_memory': mm/hugetlb.c:4172:57: warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits] 4172 | WARN_ON(hpool->mmap_reserved_1G < 0); | ^ include/asm-generic/bug.h:124:32: note: in definition of macro 'WARN_ON' 124 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ mm/hugetlb.c:4188:57: warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits] 4188 | WARN_ON(hpool->mmap_reserved_2M < 0); | ^ include/asm-generic/bug.h:124:32: note: in definition of macro 'WARN_ON' 124 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ In file included from mm/hugetlb.c:14: include/linux/mempolicy.h: At top level: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ mm/hugetlb.c: In function 'free_back_hugetlb': mm/hugetlb.c:3748:51: warning: array subscript idx is outside array bounds of 'struct dhugetlb_pool *[0]' [-Warray-bounds=] 3748 | dhugetlb_pagelist_t->hpool[idx] = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ In file included from include/linux/migrate.h:8, from mm/hugetlb.c:34: include/linux/hugetlb.h:676:31: note: while referencing 'hpool' 676 | struct dhugetlb_pool *hpool[0]; | ^~~~~ mm/hugetlb.c: In function 'hugetlb_migrate_pages': >> mm/hugetlb.c:3967:41: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 3967 | list_len(&hpool->smpool[i].head_page); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ mm/hugetlb.c:3966:46: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 3966 | hpool->smpool[i].free_pages = | ~~~~~~~~~~~~~^~~ include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In file included from include/linux/mmzone.h:9, from include/linux/gfp.h:6, from include/linux/mm.h:11: In function 'spin_unlock', inlined from 'hugetlb_migrate_pages' at mm/hugetlb.c:3972:5: >> include/linux/spinlock.h:369:25: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 369 | raw_spin_unlock(&lock->rlock); | ^~~~~~~~~~~~ include/linux/spinlock.h:273:58: note: in definition of macro 'raw_spin_unlock' 273 | #define raw_spin_unlock(lock) _raw_spin_unlock(lock) | ^~~~ include/linux/hugetlb.h: In function 'hugetlb_migrate_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'spin_lock', inlined from 'hugetlb_migrate_pages' at mm/hugetlb.c:3980:5: include/linux/spinlock.h:329:23: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 329 | raw_spin_lock(&lock->rlock); | ^~~~~~~~~~~~ include/linux/spinlock.h:214:48: note: in definition of macro 'raw_spin_lock' 214 | #define raw_spin_lock(lock) _raw_spin_lock(lock) | ^~~~ include/linux/hugetlb.h: In function 'hugetlb_migrate_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'spin_lock', inlined from 'dhugetlb_collect_2M_pages' at mm/hugetlb.c:4096:4: include/linux/spinlock.h:329:23: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 329 | raw_spin_lock(&lock->rlock); | ^~~~~~~~~~~~ include/linux/spinlock.h:214:48: note: in definition of macro 'raw_spin_lock' 214 | #define raw_spin_lock(lock) _raw_spin_lock(lock) | ^~~~ include/linux/hugetlb.h: In function 'dhugetlb_collect_2M_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'merge_free_small_page', inlined from 'dhugetlb_collect_2M_pages' at mm/hugetlb.c:4098:3: mm/hugetlb.c:4076:33: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 4076 | list_len(&hpool->smpool[i].head_page); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hugetlb.h: In function 'dhugetlb_collect_2M_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'merge_free_small_page', inlined from 'dhugetlb_collect_2M_pages' at mm/hugetlb.c:4098:3: mm/hugetlb.c:4075:30: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 4075 | hpool->smpool[i].free_pages = | ~~~~~~~~~~~~~^~~ include/linux/hugetlb.h: In function 'dhugetlb_collect_2M_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'spin_unlock', inlined from 'dhugetlb_collect_2M_pages' at mm/hugetlb.c:4100:4: >> include/linux/spinlock.h:369:25: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 369 | raw_spin_unlock(&lock->rlock); | ^~~~~~~~~~~~ include/linux/spinlock.h:273:58: note: in definition of macro 'raw_spin_unlock' 273 | #define raw_spin_unlock(lock) _raw_spin_unlock(lock) | ^~~~ include/linux/hugetlb.h: In function 'dhugetlb_collect_2M_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'spin_unlock', inlined from 'try_migrate_pages' at mm/hugetlb.c:3641:3: >> include/linux/spinlock.h:369:25: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 369 | raw_spin_unlock(&lock->rlock); | ^~~~~~~~~~~~ include/linux/spinlock.h:273:58: note: in definition of macro 'raw_spin_unlock' 273 | #define raw_spin_unlock(lock) _raw_spin_unlock(lock) | ^~~~ include/linux/hugetlb.h: In function 'try_migrate_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'spin_lock', inlined from 'try_migrate_pages' at mm/hugetlb.c:3650:3: include/linux/spinlock.h:329:23: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 329 | raw_spin_lock(&lock->rlock); | ^~~~~~~~~~~~ include/linux/spinlock.h:214:48: note: in definition of macro 'raw_spin_lock' 214 | #define raw_spin_lock(lock) _raw_spin_lock(lock) | ^~~~ include/linux/hugetlb.h: In function 'try_migrate_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ mm/hugetlb.c:3651:47: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 3651 | nr_free_pages += hpool->smpool[i].free_pages; | ~~~~~~~~~~~~~^~~ include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'spin_lock', inlined from 'try_migrate_pages' at mm/hugetlb.c:3674:3: include/linux/spinlock.h:329:23: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 329 | raw_spin_lock(&lock->rlock); | ^~~~~~~~~~~~ include/linux/spinlock.h:214:48: note: in definition of macro 'raw_spin_lock' 214 | #define raw_spin_lock(lock) _raw_spin_lock(lock) | ^~~~ include/linux/hugetlb.h: In function 'try_migrate_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ mm/hugetlb.c: In function 'free_dhugetlb_pages': mm/hugetlb.c:3692:44: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 3692 | used_pages += hpool->smpool[i].used_pages; | ~~~~~~~~~~~~~^~~ include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'free_dhugetlb_pcpool', inlined from 'free_dhugetlb_pages' at mm/hugetlb.c:3711:3: mm/hugetlb.c:3474:26: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 3474 | smpool = &hpool->smpool[i]; | ^~~~~~~~~~~~~~~~~ include/linux/hugetlb.h: In function 'free_dhugetlb_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'free_dhugetlb_pcpool', inlined from 'free_dhugetlb_pages' at mm/hugetlb.c:3711:3: mm/hugetlb.c:3475:29: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 3475 | list_splice(&smpool->head_page, &hpool->dhugetlb_4K_freelists); | ^~~~~~~~~~~~~~~~~~ include/linux/hugetlb.h: In function 'free_dhugetlb_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'free_dhugetlb_pcpool', inlined from 'free_dhugetlb_pages' at mm/hugetlb.c:3711:3: mm/hugetlb.c:3474:40: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 3474 | smpool = &hpool->smpool[i]; | ~~~~~~~~~~~~~^~~ include/linux/hugetlb.h: In function 'free_dhugetlb_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'free_dhugetlb_pcpool', inlined from 'free_dhugetlb_pages' at mm/hugetlb.c:3711:3: mm/hugetlb.c:3474:40: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 3474 | smpool = &hpool->smpool[i]; | ~~~~~~~~~~~~~^~~ include/linux/hugetlb.h: In function 'free_dhugetlb_pages': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ mm/hugetlb.c: In function 'hpool_alloc': include/linux/spinlock.h:324:28: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 324 | raw_spin_lock_init(&(_lock)->rlock); \ | ^ include/linux/spinlock.h:100:31: note: in definition of macro 'raw_spin_lock_init' 100 | __raw_spin_lock_init((lock), #lock, &__key); \ | ^~~~ mm/hugetlb.c:3327:17: note: in expansion of macro 'spin_lock_init' 3327 | spin_lock_init(&hpool->smpool[i].lock); | ^~~~~~~~~~~~~~ include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ mm/hugetlb.c:3328:17: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 3328 | INIT_LIST_HEAD(&hpool->smpool[i].head_page); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ mm/hugetlb.c: In function 'update_dhugetlb_pagelist': mm/hugetlb.c:3408:35: warning: array subscript idx is outside array bounds of 'struct dhugetlb_pool *[0]' [-Warray-bounds=] 3408 | dhugetlb_pagelist_t->hpool[idx] = hpool; | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/linux/hugetlb.h:676:31: note: while referencing 'hpool' 676 | struct dhugetlb_pool *hpool[0]; | ^~~~~ mm/hugetlb.c: In function 'get_dhugetlb_pool_from_dhugetlb_pagelist': mm/hugetlb.c:3421:51: warning: array subscript idx is outside array bounds of 'struct dhugetlb_pool *[0]' [-Warray-bounds=] 3421 | hpool = dhugetlb_pagelist_t->hpool[idx]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/linux/hugetlb.h:676:31: note: while referencing 'hpool' 676 | struct dhugetlb_pool *hpool[0]; | ^~~~~ In function 'spin_lock', inlined from 'free_dhugetlb_pool' at mm/hugetlb.c:3766:3: include/linux/spinlock.h:329:23: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 329 | raw_spin_lock(&lock->rlock); | ^~~~~~~~~~~~ include/linux/spinlock.h:214:48: note: in definition of macro 'raw_spin_lock' 214 | #define raw_spin_lock(lock) _raw_spin_lock(lock) | ^~~~ include/linux/hugetlb.h: In function 'free_dhugetlb_pool': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'spin_unlock', inlined from 'free_dhugetlb_pool' at mm/hugetlb.c:3778:3: >> include/linux/spinlock.h:369:25: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 369 | raw_spin_unlock(&lock->rlock); | ^~~~~~~~~~~~ include/linux/spinlock.h:273:58: note: in definition of macro 'raw_spin_unlock' 273 | #define raw_spin_unlock(lock) _raw_spin_unlock(lock) | ^~~~ include/linux/hugetlb.h: In function 'free_dhugetlb_pool': include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ -- | ^~~ In file included from include/linux/shmem_fs.h:7, from mm/memcontrol.c:39: include/linux/mempolicy.h: At top level: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ In function 'free_mem_cgroup_per_node_info', inlined from '__mem_cgroup_free' at mm/memcontrol.c:5315:3: mm/memcontrol.c:5296:57: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 5296 | struct mem_cgroup_per_node *pn = memcg->nodeinfo[node]; | ~~~~~~~~~~~~~~~^~~~~~ In file included from mm/memcontrol.c:35: include/linux/memcontrol.h: In function '__mem_cgroup_free': include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ mm/memcontrol.c: In function 'alloc_mem_cgroup_per_node_info.constprop': mm/memcontrol.c:5290:24: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 5290 | memcg->nodeinfo[node] = pn; | ~~~~~~~~~~~~~~~^~~~~~ include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In function 'mem_cgroup_nodeinfo', inlined from 'memcg_free_shrinker_maps.part.0' at mm/memcontrol.c:375:8: include/linux/memcontrol.h:399:31: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 399 | return memcg->nodeinfo[nid]; | ~~~~~~~~~~~~~~~^~~~~ include/linux/memcontrol.h: In function 'memcg_free_shrinker_maps.part.0': include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In function 'mem_cgroup_nodeinfo', inlined from 'memcg_expand_one_shrinker_map' at mm/memcontrol.c:344:9: include/linux/memcontrol.h:399:31: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 399 | return memcg->nodeinfo[nid]; | ~~~~~~~~~~~~~~~^~~~~ include/linux/memcontrol.h: In function 'memcg_expand_one_shrinker_map': include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In file included from arch/x86/include/asm/atomic.h:5, from include/linux/atomic.h:7, from include/linux/page_counter.h:5: mm/memcontrol.c:358:51: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 358 | rcu_assign_pointer(memcg->nodeinfo[nid]->shrinker_map, new); | ~~~~~~~~~~~~~~~^~~~~ include/linux/compiler.h:296:29: note: in definition of macro 'WRITE_ONCE' 296 | __write_once_size(&(x), __u.__c, sizeof(x)); \ | ^ include/linux/rcupdate.h:409:17: note: in expansion of macro 'smp_store_release' 409 | smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ | ^~~~~~~~~~~~~~~~~ mm/memcontrol.c:358:17: note: in expansion of macro 'rcu_assign_pointer' 358 | rcu_assign_pointer(memcg->nodeinfo[nid]->shrinker_map, new); | ^~~~~~~~~~~~~~~~~~ include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In function 'mem_cgroup_nodeinfo', inlined from '__invalidate_reclaim_iterators' at mm/memcontrol.c:1185:8, inlined from 'invalidate_reclaim_iterators' at mm/memcontrol.c:1211:3, inlined from 'mem_cgroup_css_released' at mm/memcontrol.c:5520:2: include/linux/memcontrol.h:399:31: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 399 | return memcg->nodeinfo[nid]; | ~~~~~~~~~~~~~~~^~~~~ include/linux/memcontrol.h: In function 'mem_cgroup_css_released': include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In function 'mem_cgroup_nodeinfo', inlined from '__invalidate_reclaim_iterators' at mm/memcontrol.c:1185:8, inlined from 'invalidate_reclaim_iterators' at mm/memcontrol.c:1200:3, inlined from 'mem_cgroup_css_released' at mm/memcontrol.c:5520:2: include/linux/memcontrol.h:399:31: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 399 | return memcg->nodeinfo[nid]; | ~~~~~~~~~~~~~~~^~~~~ include/linux/memcontrol.h: In function 'mem_cgroup_css_released': include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ mm/memcontrol.c: In function 'memcg_flush_percpu_vmstats': mm/memcontrol.c:3318:65: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 3318 | struct mem_cgroup_per_node *pn = memcg->nodeinfo[node]; | ~~~~~~~~~~~~~~~^~~~~~ include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In function 'mem_cgroup_nodeinfo', inlined from 'parent_nodeinfo' at mm/memcontrol.c:726:9, inlined from 'memcg_flush_percpu_vmstats' at mm/memcontrol.c:3331:26: include/linux/memcontrol.h:399:31: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 399 | return memcg->nodeinfo[nid]; | ~~~~~~~~~~~~~~~^~~~~ include/linux/memcontrol.h: In function 'memcg_flush_percpu_vmstats': include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ mm/memcontrol.c: In function '__alloc_page_from_dhugetlb_pool': >> mm/memcontrol.c:4769:18: warning: array subscript 0 is outside array bounds of 'struct small_page_pool[0]' [-Warray-bounds=] 4769 | smpool = &hpool->smpool[smp_processor_id()]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from mm/memcontrol.c:40: include/linux/hugetlb.h:725:32: note: while referencing 'smpool' 725 | struct small_page_pool smpool[0]; | ^~~~~~ In function 'memcg_alloc_shrinker_maps', inlined from 'mem_cgroup_css_online' at mm/memcontrol.c:5472:6: mm/memcontrol.c:400:51: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 400 | rcu_assign_pointer(memcg->nodeinfo[nid]->shrinker_map, map); | ~~~~~~~~~~~~~~~^~~~~ include/linux/compiler.h:296:29: note: in definition of macro 'WRITE_ONCE' 296 | __write_once_size(&(x), __u.__c, sizeof(x)); \ | ^ include/linux/rcupdate.h:409:17: note: in expansion of macro 'smp_store_release' 409 | smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \ | ^~~~~~~~~~~~~~~~~ mm/memcontrol.c:400:17: note: in expansion of macro 'rcu_assign_pointer' 400 | rcu_assign_pointer(memcg->nodeinfo[nid]->shrinker_map, map); | ^~~~~~~~~~~~~~~~~~ include/linux/memcontrol.h: In function 'mem_cgroup_css_online': include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ In function 'mem_cgroup_nodeinfo', inlined from 'mem_cgroup_remove_from_trees' at mm/memcontrol.c:643:8, inlined from 'mem_cgroup_css_free' at mm/memcontrol.c:5535:2: include/linux/memcontrol.h:399:31: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 399 | return memcg->nodeinfo[nid]; | ~~~~~~~~~~~~~~~^~~~~ include/linux/memcontrol.h: In function 'mem_cgroup_css_free': include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ mm/memcontrol.c: In function '__mem_cgroup_threshold': mm/memcontrol.c:4055:45: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 4055 | for (; i >= 0 && unlikely(t->entries[i].threshold > usage); i--) | ~~~~~~~~~~^~~ include/linux/compiler.h:77:45: note: in definition of macro 'unlikely' 77 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/memcontrol.h:170:37: note: while referencing 'entries' 170 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:4056:42: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 4056 | eventfd_signal(t->entries[i].eventfd, 1); | ~~~~~~~~~~^~~ include/linux/memcontrol.h:170:37: note: while referencing 'entries' 170 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:4067:50: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 4067 | for (; i < t->size && unlikely(t->entries[i].threshold <= usage); i++) | ~~~~~~~~~~^~~ include/linux/compiler.h:77:45: note: in definition of macro 'unlikely' 77 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/memcontrol.h:170:37: note: while referencing 'entries' 170 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:4068:42: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 4068 | eventfd_signal(t->entries[i].eventfd, 1); | ~~~~~~~~~~^~~ include/linux/memcontrol.h:170:37: note: while referencing 'entries' 170 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ In function 'mem_cgroup_page_nodeinfo', inlined from 'mem_cgroup_update_tree' at mm/memcontrol.c:613:8, inlined from 'memcg_check_events.part.0' at mm/memcontrol.c:904:4: mm/memcontrol.c:507:31: warning: array subscript 0 is outside array bounds of 'struct mem_cgroup_per_node *[0]' [-Warray-bounds=] 507 | return memcg->nodeinfo[nid]; | ~~~~~~~~~~~~~~~^~~~~ include/linux/memcontrol.h: In function 'memcg_check_events.part.0': include/linux/memcontrol.h:324:37: note: while referencing 'nodeinfo' 324 | struct mem_cgroup_per_node *nodeinfo[0]; | ^~~~~~~~ mm/memcontrol.c: In function '__mem_cgroup_usage_unregister_event': mm/memcontrol.c:4268:49: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 4268 | if (thresholds->primary->entries[i].eventfd == eventfd) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ include/linux/memcontrol.h:170:37: note: while referencing 'entries' 170 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:4271:63: warning: array subscript i is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 4271 | new->entries[j] = thresholds->primary->entries[i]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ include/linux/memcontrol.h:170:37: note: while referencing 'entries' 170 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:4271:29: warning: array subscript j is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 4271 | new->entries[j] = thresholds->primary->entries[i]; | ~~~~~~~~~~~~^~~ include/linux/memcontrol.h:170:37: note: while referencing 'entries' 170 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ mm/memcontrol.c:4272:33: warning: array subscript j is outside array bounds of 'struct mem_cgroup_threshold[0]' [-Warray-bounds=] 4272 | if (new->entries[j].threshold <= usage) { | ~~~~~~~~~~~~^~~ include/linux/memcontrol.h:170:37: note: while referencing 'entries' 170 | struct mem_cgroup_threshold entries[0]; | ^~~~~~~ .. vim +3967 mm/hugetlb.c 3938 3939 static void hugetlb_migrate_pages(struct dhugetlb_pool *hpool, 3940 unsigned long count) 3941 { 3942 int i, try; 3943 struct page *page; 3944 struct split_pages *split_huge, *split_next; 3945 unsigned long nr_pages = 1 << (PMD_SHIFT - PAGE_SHIFT); 3946 LIST_HEAD(wait_page_list); 3947 3948 list_for_each_entry_safe(split_huge, split_next, 3949 &hpool->split_2M_freelists, list) { 3950 /* 3951 * Isolate free page first because we dont want them to be 3952 * allocated. 3953 */ 3954 for (i = 0; i < nr_pages; i++) { 3955 page = pfn_to_page(split_huge->start_pfn + i); 3956 if (!PagePool(page)) 3957 list_move(&page->lru, &wait_page_list); 3958 } 3959 3960 for (try = 0; try < HPOOL_RECLAIM_RETRIES; try++) { 3961 /* 3962 * Unlock and try migration, after migration we need 3963 * to lock back. 3964 */ 3965 for (i = 0; i < NR_SMPOOL; i++) 3966 hpool->smpool[i].free_pages = > 3967 list_len(&hpool->smpool[i].head_page); 3968 hpool->free_pages = 3969 list_len(&hpool->dhugetlb_4K_freelists); 3970 spin_unlock(&hpool->lock); 3971 for (i = NR_SMPOOL - 1; i >= 0; i--) 3972 spin_unlock(&hpool->smpool[i].lock); 3973 3974 for (i = 0; i < nr_pages; i++) { 3975 page = pfn_to_page(split_huge->start_pfn + i); 3976 if (PagePool(page)) 3977 try_migrate_page(page, hpool->nid); 3978 } 3979 for (i = 0; i < NR_SMPOOL; i++) 3980 spin_lock(&hpool->smpool[i].lock); 3981 spin_lock(&hpool->lock); 3982 3983 /* 3984 * Isolate free page. If all page in the split_huge 3985 * is free, return it. 3986 */ 3987 split_huge->free_pages = 0; 3988 for (i = 0; i < nr_pages; i++) { 3989 page = pfn_to_page(split_huge->start_pfn + i); 3990 if (!PagePool(page)) { 3991 list_move(&page->lru, &wait_page_list); 3992 split_huge->free_pages++; 3993 } 3994 } 3995 if (split_huge->free_pages == nr_pages) 3996 break; 3997 } 3998 if (split_huge->free_pages == nr_pages) { 3999 for (i = 0; i < nr_pages; i++) { 4000 page = pfn_to_page(split_huge->start_pfn + i); 4001 list_del(&page->lru); 4002 } 4003 INIT_LIST_HEAD(&wait_page_list); 4004 page = pfn_to_page(split_huge->start_pfn); 4005 add_new_huge_page_to_pool(hpool, page, false); 4006 list_del(&split_huge->list); 4007 kfree(split_huge); 4008 hpool->nr_split_2M--; 4009 4010 trace_dhugetlb_split_merge(hpool, page, 4011 DHUGETLB_MIGRATE_4K); 4012 4013 if (--count == 0) 4014 return; 4015 } else { 4016 /* Failed, put back the isolate pages */ 4017 list_splice(&wait_page_list, 4018 &hpool->dhugetlb_4K_freelists); 4019 INIT_LIST_HEAD(&wait_page_list); 4020 } 4021 } 4022 } 4023 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 1140
  • 1141
  • 1142
  • 1143
  • 1144
  • 1145
  • 1146
  • ...
  • 1928
  • Older →

HyperKitty Powered by HyperKitty