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 -----
  • December
  • November
  • October
  • September
  • August
  • 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

  • 45 participants
  • 21931 discussions
[openeuler:openEuler-1.0-LTS 1941/1941] net/netfilter/nf_conntrack_core.c:1017: warning: Function parameter or member 'reply_hash' not described in 'nf_ct_resolve_clash'
by kernel test robot 13 Dec '25

13 Dec '25
Hi Florian, First bad commit (maybe != root cause): tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: df8d11fbcbb07177c2500e63d7f5a36063977596 commit: cc12c927ac504e99fc176ea49e85226b6aeadcd5 [1941/1941] netfilter: conntrack: allow insertion of clashing entries config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20251213/202512131110.yshNLkZn-lkp@…) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 6ec8c4351cfc1d0627d1633b02ea787bd29c77d8) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512131110.yshNLkZn-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/202512131110.yshNLkZn-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from net/netfilter/nf_conntrack_core.c:40: In file included from include/net/netfilter/nf_conntrack.h:25: In file included from include/linux/netfilter/nf_conntrack_proto_gre.h:5: In file included from include/net/gre.h:6: In file included from include/net/ip_tunnels.h:19: In file included from include/net/dst_cache.h:8: include/net/ip6_fib.h:228:10: warning: default initialization of an object of type 'typeof (f6i->expires)' (aka 'const unsigned long') leaves the object uninitialized [-Wdefault-const-init-var-unsafe] 228 | return time_after(jiffies, f6i->expires); | ^ include/linux/jiffies.h:107:3: note: expanded from macro 'time_after' 107 | typecheck(unsigned long, b) && \ | ^ include/linux/typecheck.h:11:12: note: expanded from macro 'typecheck' 11 | typeof(x) __dummy2; \ | ^ 1 warning generated. >> net/netfilter/nf_conntrack_core.c:1017: warning: Function parameter or member 'reply_hash' not described in 'nf_ct_resolve_clash' >> net/netfilter/nf_conntrack_core.c:1017: warning: Excess function parameter 'hash_reply' description in 'nf_ct_resolve_clash' vim +1017 net/netfilter/nf_conntrack_core.c cc12c927ac504e Florian Westphal 2023-11-02 980 6199b71796bcaa Florian Westphal 2023-11-02 981 /** 6199b71796bcaa Florian Westphal 2023-11-02 982 * nf_ct_resolve_clash - attempt to handle clash without packet drop 6199b71796bcaa Florian Westphal 2023-11-02 983 * 6199b71796bcaa Florian Westphal 2023-11-02 984 * @skb: skb that causes the clash 6199b71796bcaa Florian Westphal 2023-11-02 985 * @h: tuplehash of the clashing entry already in table cc12c927ac504e Florian Westphal 2023-11-02 986 * @hash_reply: hash slot for reply direction 6199b71796bcaa Florian Westphal 2023-11-02 987 * 6199b71796bcaa Florian Westphal 2023-11-02 988 * A conntrack entry can be inserted to the connection tracking table 6199b71796bcaa Florian Westphal 2023-11-02 989 * if there is no existing entry with an identical tuple. 6199b71796bcaa Florian Westphal 2023-11-02 990 * 6199b71796bcaa Florian Westphal 2023-11-02 991 * If there is one, @skb (and the assocated, unconfirmed conntrack) has 6199b71796bcaa Florian Westphal 2023-11-02 992 * to be dropped. In case @skb is retransmitted, next conntrack lookup 6199b71796bcaa Florian Westphal 2023-11-02 993 * will find the already-existing entry. 6199b71796bcaa Florian Westphal 2023-11-02 994 * 6199b71796bcaa Florian Westphal 2023-11-02 995 * The major problem with such packet drop is the extra delay added by 6199b71796bcaa Florian Westphal 2023-11-02 996 * the packet loss -- it will take some time for a retransmit to occur 6199b71796bcaa Florian Westphal 2023-11-02 997 * (or the sender to time out when waiting for a reply). 6199b71796bcaa Florian Westphal 2023-11-02 998 * 6199b71796bcaa Florian Westphal 2023-11-02 999 * This function attempts to handle the situation without packet drop. 6199b71796bcaa Florian Westphal 2023-11-02 1000 * 6199b71796bcaa Florian Westphal 2023-11-02 1001 * If @skb has no NAT transformation or if the colliding entries are 6199b71796bcaa Florian Westphal 2023-11-02 1002 * exactly the same, only the to-be-confirmed conntrack entry is discarded 6199b71796bcaa Florian Westphal 2023-11-02 1003 * and @skb is associated with the conntrack entry already in the table. 6199b71796bcaa Florian Westphal 2023-11-02 1004 * cc12c927ac504e Florian Westphal 2023-11-02 1005 * Failing that, the new, unconfirmed conntrack is still added to the table cc12c927ac504e Florian Westphal 2023-11-02 1006 * provided that the collision only occurs in the ORIGINAL direction. cc12c927ac504e Florian Westphal 2023-11-02 1007 * The new entry will be added after the existing one in the hash list, cc12c927ac504e Florian Westphal 2023-11-02 1008 * so packets in the ORIGINAL direction will continue to match the existing cc12c927ac504e Florian Westphal 2023-11-02 1009 * entry. The new entry will also have a fixed timeout so it expires -- cc12c927ac504e Florian Westphal 2023-11-02 1010 * due to the collision, it will not see bidirectional traffic. cc12c927ac504e Florian Westphal 2023-11-02 1011 * 6199b71796bcaa Florian Westphal 2023-11-02 1012 * Returns NF_DROP if the clash could not be resolved. 6199b71796bcaa Florian Westphal 2023-11-02 1013 */ 115dffa33ea6f5 Florian Westphal 2023-11-02 1014 static __cold noinline int cc12c927ac504e Florian Westphal 2023-11-02 1015 nf_ct_resolve_clash(struct sk_buff *skb, struct nf_conntrack_tuple_hash *h, cc12c927ac504e Florian Westphal 2023-11-02 1016 u32 reply_hash) 71d8c47fc65371 Pablo Neira Ayuso 2016-05-01 @1017 { 71d8c47fc65371 Pablo Neira Ayuso 2016-05-01 1018 /* This is the conntrack entry already in hashes that won race. */ 71d8c47fc65371 Pablo Neira Ayuso 2016-05-01 1019 struct nf_conn *ct = nf_ct_tuplehash_to_ctrack(h); b3480fe059ac91 Florian Westphal 2017-08-12 1020 const struct nf_conntrack_l4proto *l4proto; 6199b71796bcaa Florian Westphal 2023-11-02 1021 enum ip_conntrack_info ctinfo; 6199b71796bcaa Florian Westphal 2023-11-02 1022 struct nf_conn *loser_ct; 6199b71796bcaa Florian Westphal 2023-11-02 1023 struct net *net; 94ebb264459f97 Florian Westphal 2023-11-02 1024 int ret; 6199b71796bcaa Florian Westphal 2023-11-02 1025 6199b71796bcaa Florian Westphal 2023-11-02 1026 loser_ct = nf_ct_get(skb, &ctinfo); 94ebb264459f97 Florian Westphal 2023-11-02 1027 net = nf_ct_net(loser_ct); 71d8c47fc65371 Pablo Neira Ayuso 2016-05-01 1028 71d8c47fc65371 Pablo Neira Ayuso 2016-05-01 1029 l4proto = __nf_ct_l4proto_find(nf_ct_l3num(ct), nf_ct_protonum(ct)); 6199b71796bcaa Florian Westphal 2023-11-02 1030 if (!l4proto->allow_clash) 6199b71796bcaa Florian Westphal 2023-11-02 1031 goto drop; 6199b71796bcaa Florian Westphal 2023-11-02 1032 94ebb264459f97 Florian Westphal 2023-11-02 1033 ret = __nf_ct_resolve_clash(skb, h); 94ebb264459f97 Florian Westphal 2023-11-02 1034 if (ret == NF_ACCEPT) 94ebb264459f97 Florian Westphal 2023-11-02 1035 return ret; 6199b71796bcaa Florian Westphal 2023-11-02 1036 cc12c927ac504e Florian Westphal 2023-11-02 1037 ret = nf_ct_resolve_clash_harder(skb, reply_hash); cc12c927ac504e Florian Westphal 2023-11-02 1038 if (ret == NF_ACCEPT) cc12c927ac504e Florian Westphal 2023-11-02 1039 return ret; cc12c927ac504e Florian Westphal 2023-11-02 1040 6199b71796bcaa Florian Westphal 2023-11-02 1041 drop: 94ebb264459f97 Florian Westphal 2023-11-02 1042 nf_ct_add_to_dying_list(loser_ct); 71d8c47fc65371 Pablo Neira Ayuso 2016-05-01 1043 NF_CT_STAT_INC(net, drop); 94ebb264459f97 Florian Westphal 2023-11-02 1044 NF_CT_STAT_INC(net, insert_failed); 71d8c47fc65371 Pablo Neira Ayuso 2016-05-01 1045 return NF_DROP; 71d8c47fc65371 Pablo Neira Ayuso 2016-05-01 1046 } 71d8c47fc65371 Pablo Neira Ayuso 2016-05-01 1047 :::::: The code at line 1017 was first introduced by commit :::::: 71d8c47fc653711c41bc3282e5b0e605b3727956 netfilter: conntrack: introduce clash resolution on insertion race :::::: TO: Pablo Neira Ayuso <pablo(a)netfilter.org> :::::: CC: Pablo Neira Ayuso <pablo(a)netfilter.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1941/1941] net/netfilter/nf_nat_proto.c:56:6: warning: no previous prototype for 'nf_nat_csum_recalc'
by kernel test robot 13 Dec '25

13 Dec '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: df8d11fbcbb07177c2500e63d7f5a36063977596 commit: 83abe3a3b85762720192809ac8695ff9255cfd23 [1941/1941] netfilter: nat: remove csum_recalc hook config: arm64-defconfig (https://download.01.org/0day-ci/archive/20251213/202512131018.8qdFT5tV-lkp@…) compiler: aarch64-linux-gcc (GCC) 15.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512131018.8qdFT5tV-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/202512131018.8qdFT5tV-lkp@intel.com/ All warnings (new ones prefixed by >>): >> net/netfilter/nf_nat_proto.c:56:6: warning: no previous prototype for 'nf_nat_csum_recalc' [-Wmissing-prototypes] 56 | void nf_nat_csum_recalc(struct sk_buff *skb, | ^~~~~~~~~~~~~~~~~~ vim +/nf_nat_csum_recalc +56 net/netfilter/nf_nat_proto.c 55 > 56 void nf_nat_csum_recalc(struct sk_buff *skb, -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:134:6: warning: variable 'value_back' set but not used
by kernel test robot 13 Dec '25

13 Dec '25
Hi leoliu-oc, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: 996e18349e58a3ace519f9c0f32f4e62fc46ec2c [3541/3541] Add support Zhaoxin GPIO pinctrl config: x86_64-randconfig-r134-20251213 (https://download.01.org/0day-ci/archive/20251213/202512131040.ErvjOWkV-lkp@…) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512131040.ErvjOWkV-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/202512131040.ErvjOWkV-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:134:6: warning: variable 'value_back' set but not used [-Wunused-but-set-variable] 134 | u16 value_back = 0; | ^ drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:257:6: warning: variable 'pin' set but not used [-Wunused-but-set-variable] 257 | int pin; | ^ drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:277:6: warning: variable 'pin' set but not used [-Wunused-but-set-variable] 277 | int pin; | ^ drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:337:6: warning: variable 'base_offset' set but not used [-Wunused-but-set-variable] 337 | int base_offset = 0; | ^ drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:340:6: warning: variable 'value_read' set but not used [-Wunused-but-set-variable] 340 | u16 value_read; | ^ drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:371:6: warning: variable 'base_offset' set but not used [-Wunused-but-set-variable] 371 | int base_offset = 0; | ^ 6 warnings generated. vim +/value_back +134 drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c 128 129 static void zhaoxin_gpio_set_gpio_mode_and_pull(struct zhaoxin_pinctrl *pctrl, unsigned int pin, 130 bool isup) 131 { 132 u16 tmp = 0; 133 u16 value; > 134 u16 value_back = 0; 135 136 if (isup) 137 tmp = ZHAOXIN_PULL_UP_10K|1; 138 else 139 tmp = ZHAOXIN_PULL_DOWN|1; 140 value = zx_pad_read16(pctrl, pin); 141 142 //for gpio 143 if (pin <= 0x32 && pin >= 0x29) { 144 if (isup) { 145 value &= (~(ZHAOXIN_PULL_DOWN)); 146 value |= tmp; 147 } else { 148 value &= (~(ZHAOXIN_PULL_UP)); 149 value |= tmp; 150 } 151 value &= ~(0x1); 152 zx_pad_write16(pctrl, pin, value); 153 value_back = zx_pad_read16(pctrl, pin); 154 } else {// for pgpio 155 if (isup) { 156 value &= (~(ZHAOXIN_PULL_DOWN)); 157 value |= tmp; 158 } else { 159 value &= (~(ZHAOXIN_PULL_UP)); 160 value |= tmp; 161 } 162 value |= 0x1; 163 zx_pad_write16(pctrl, pin, value); 164 value_back = zx_pad_read16(pctrl, pin); 165 } 166 } 167 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] drivers/crypto/montage/tsse/tsse_fw_service.c:40:16: sparse: sparse: cast removes address space '__iomem' of expression
by kernel test robot 13 Dec '25

13 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: 811debd4ea52033d7393d4a7de2be11f71c70348 [3541/3541] add support for Mont-TSSE Driver config: x86_64-randconfig-r122-20251213 (https://download.01.org/0day-ci/archive/20251213/202512130900.UPe4oSIC-lkp@…) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512130900.UPe4oSIC-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/202512130900.UPe4oSIC-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/crypto/montage/tsse/tsse_fw_service.c:40:16: sparse: sparse: cast removes address space '__iomem' of expression drivers/crypto/montage/tsse/tsse_fw_service.c:41:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem * @@ got unsigned char [usertype] *[assigned] h2d @@ drivers/crypto/montage/tsse/tsse_fw_service.c:41:21: sparse: expected void volatile [noderef] __iomem * drivers/crypto/montage/tsse/tsse_fw_service.c:41:21: sparse: got unsigned char [usertype] *[assigned] h2d >> drivers/crypto/montage/tsse/tsse_fw_service.c:42:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem * @@ got unsigned char [usertype] * @@ drivers/crypto/montage/tsse/tsse_fw_service.c:42:25: sparse: expected void volatile [noderef] __iomem * drivers/crypto/montage/tsse/tsse_fw_service.c:42:25: sparse: got unsigned char [usertype] * drivers/crypto/montage/tsse/tsse_fw_service.c:26:5: sparse: sparse: symbol 'fw_send_msg' was not declared. Should it be static? drivers/crypto/montage/tsse/tsse_fw_service.c:51:6: sparse: sparse: symbol 'fw_free' was not declared. Should it be static? drivers/crypto/montage/tsse/tsse_fw_service.c:141:22: sparse: sparse: cast removes address space '__iomem' of expression drivers/crypto/montage/tsse/tsse_fw_service.c:141:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem * @@ got unsigned char [usertype] * @@ drivers/crypto/montage/tsse/tsse_fw_service.c:141:22: sparse: expected void volatile [noderef] __iomem * drivers/crypto/montage/tsse/tsse_fw_service.c:141:22: sparse: got unsigned char [usertype] * -- >> drivers/crypto/montage/tsse/tsse_vuart.c:61:28: sparse: sparse: cast to restricted __le32 >> drivers/crypto/montage/tsse/tsse_vuart.c:73:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected int value @@ got restricted __le32 [usertype] @@ drivers/crypto/montage/tsse/tsse_vuart.c:73:15: sparse: expected int value drivers/crypto/montage/tsse/tsse_vuart.c:73:15: sparse: got restricted __le32 [usertype] vim +/__iomem +40 drivers/crypto/montage/tsse/tsse_fw_service.c 25 26 int fw_send_msg(struct tsse_ipc *tsseipc, struct ipc_msg *msg) 27 { 28 u8 *h2d; 29 u32 int_reg; 30 u32 rc; 31 32 mutex_lock(&tsseipc->list_lock); 33 34 int_reg = readl(tsseipc->virt_addr + HOST2MAIN_INTR_SET_OFFSET); 35 if ((int_reg & IPC_REGISTER_INT_SET) != 0) { 36 rc = -1; 37 mutex_unlock(&tsseipc->list_lock); 38 return rc; 39 } > 40 h2d = (u8 *)(tsseipc->virt_addr + HOST2MAIN_IPC_OFFSET); 41 memcpy_toio(h2d, msg, sizeof(struct ipc_header)); > 42 memcpy_toio(h2d + sizeof(struct ipc_header), (u32 *)msg->i_data, 43 msg->header.i_len - sizeof(struct ipc_header)); 44 writel(0x1, tsseipc->virt_addr + HOST2MAIN_INTR_SET_OFFSET); 45 46 dev_info(tsseipc->dev, "notify device to get firmware\n"); 47 mutex_unlock(&tsseipc->list_lock); 48 return 0; 49 } 50 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] drivers/irqchip/irq-gic-v3.c:1541:6: warning: no previous prototype for 'gic_get_ipiv_status'
by kernel test robot 13 Dec '25

13 Dec '25
Hi Jinqian, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: 4c1b2c9b61b21a0183f345eb7076db7ac054ae6c [3541/3541] KVM: arm64: check if IPIV is enabled in BIOS config: arm64-defconfig (https://download.01.org/0day-ci/archive/20251213/202512130954.LPEUb9Ak-lkp@…) compiler: aarch64-linux-gcc (GCC) 15.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512130954.LPEUb9Ak-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/202512130954.LPEUb9Ak-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/irqchip/irq-gic-v3.c:1524:6: warning: no previous prototype for 'gic_dist_enable_ipiv' [-Wmissing-prototypes] 1524 | void gic_dist_enable_ipiv(void) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/irqchip/irq-gic-v3.c:1541:6: warning: no previous prototype for 'gic_get_ipiv_status' [-Wmissing-prototypes] 1541 | bool gic_get_ipiv_status(void) | ^~~~~~~~~~~~~~~~~~~ vim +/gic_get_ipiv_status +1541 drivers/irqchip/irq-gic-v3.c 1540 > 1541 bool gic_get_ipiv_status(void) 1542 { 1543 u32 val; 1544 1545 val = readl_relaxed(gic_data.dist_base + GICD_MISC_CTRL); 1546 if (val & GICD_MISC_CTRL_CFG_IPIV_EN) 1547 return true; 1548 1549 return false; 1550 } 1551 EXPORT_SYMBOL(gic_get_ipiv_status); 1552 #endif /* CONFIG_ARM64_HISI_IPIV */ 1553 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1941/1941] net/sched/sch_generic.c:956:6: warning: no previous prototype for 'qdisc_free_cb'
by kernel test robot 13 Dec '25

13 Dec '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: df8d11fbcbb07177c2500e63d7f5a36063977596 commit: 5a1704c7f3c1f3499716b7f440efa002f6724a35 [1941/1941] net: sched: extend Qdisc with rcu config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20251213/202512130212.T1ptA9Fd-lkp@…) compiler: aarch64-linux-gcc (GCC) 15.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512130212.T1ptA9Fd-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/202512130212.T1ptA9Fd-lkp@intel.com/ All warnings (new ones prefixed by >>): >> net/sched/sch_generic.c:956:6: warning: no previous prototype for 'qdisc_free_cb' [-Wmissing-prototypes] 956 | void qdisc_free_cb(struct rcu_head *head) | ^~~~~~~~~~~~~ vim +/qdisc_free_cb +956 net/sched/sch_generic.c 955 > 956 void qdisc_free_cb(struct rcu_head *head) 957 { 958 struct Qdisc *q = container_of(head, struct Qdisc, rcu); 959 960 qdisc_free(q); 961 } 962 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1941/1941] net/ax25/ax25_dev.o: warning: objtool: missing symbol for section .exit.text
by kernel test robot 13 Dec '25

13 Dec '25
Hi Duoming, First bad commit (maybe != root cause): tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: df8d11fbcbb07177c2500e63d7f5a36063977596 commit: 5ba8a3eb026f02aa75f4a22099250bfd4db659cb [1941/1941] ax25: add refcount in ax25_dev to avoid UAF bugs config: x86_64-buildonly-randconfig-004-20251212 (https://download.01.org/0day-ci/archive/20251213/202512130829.PYuFPQHp-lkp@…) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 1335a05ab8bc8339ce24be3a9da89d8c3f4e0571) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512130829.PYuFPQHp-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/202512130829.PYuFPQHp-lkp@intel.com/ All warnings (new ones prefixed by >>): >> net/ax25/ax25_dev.o: warning: objtool: missing symbol for section .exit.text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1941/1941] drivers/base/node.c:77: warning: Function parameter or member 'hmem_attrs' not described in 'node_access_nodes'
by kernel test robot 13 Dec '25

13 Dec '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: df8d11fbcbb07177c2500e63d7f5a36063977596 commit: 82d6c2a64cfad2a43bc6f777df1a42f61865182b [1941/1941] Intel: node: Add heterogenous memory access attributes config: x86_64-randconfig-103-20251212 (https://download.01.org/0day-ci/archive/20251213/202512130735.vWIWdRUh-lkp@…) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 1335a05ab8bc8339ce24be3a9da89d8c3f4e0571) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512130735.vWIWdRUh-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/202512130735.vWIWdRUh-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from <built-in>:2: In file included from include/linux/compiler_types.h:59: include/linux/compiler-clang.h:20:9: warning: '__SANITIZE_ADDRESS__' macro redefined [-Wmacro-redefined] 20 | #define __SANITIZE_ADDRESS__ | ^ <built-in>:354:9: note: previous definition is here 354 | #define __SANITIZE_ADDRESS__ 1 | ^ 1 warning generated. >> drivers/base/node.c:77: warning: Function parameter or member 'hmem_attrs' not described in 'node_access_nodes' drivers/base/node.c:539: warning: Function parameter or member 'mem_nid' not described in 'register_memory_node_under_compute_node' drivers/base/node.c:539: warning: Function parameter or member 'cpu_nid' not described in 'register_memory_node_under_compute_node' drivers/base/node.c:539: warning: Excess function parameter 'mem_node' description in 'register_memory_node_under_compute_node' drivers/base/node.c:539: warning: Excess function parameter 'cpu_node' description in 'register_memory_node_under_compute_node' vim +77 drivers/base/node.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 62 9e8e325cfd089c Keith Busch 2021-09-11 63 /** 9e8e325cfd089c Keith Busch 2021-09-11 64 * struct node_access_nodes - Access class device to hold user visible 9e8e325cfd089c Keith Busch 2021-09-11 65 * relationships to other nodes. 9e8e325cfd089c Keith Busch 2021-09-11 66 * @dev: Device for this memory access class 9e8e325cfd089c Keith Busch 2021-09-11 67 * @list_node: List element in the node's access list 9e8e325cfd089c Keith Busch 2021-09-11 68 * @access: The access class rank 9e8e325cfd089c Keith Busch 2021-09-11 69 */ 9e8e325cfd089c Keith Busch 2021-09-11 70 struct node_access_nodes { 9e8e325cfd089c Keith Busch 2021-09-11 71 struct device dev; 9e8e325cfd089c Keith Busch 2021-09-11 72 struct list_head list_node; 9e8e325cfd089c Keith Busch 2021-09-11 73 unsigned access; 82d6c2a64cfad2 Keith Busch 2021-09-11 74 #ifdef CONFIG_HMEM_REPORTING 82d6c2a64cfad2 Keith Busch 2021-09-11 75 struct node_hmem_attrs hmem_attrs; 82d6c2a64cfad2 Keith Busch 2021-09-11 76 #endif 9e8e325cfd089c Keith Busch 2021-09-11 @77 }; 9e8e325cfd089c Keith Busch 2021-09-11 78 #define to_access_nodes(dev) container_of(dev, struct node_access_nodes, dev) 9e8e325cfd089c Keith Busch 2021-09-11 79 :::::: The code at line 77 was first introduced by commit :::::: 9e8e325cfd089c66c9a2f570f99021a62bf0ae09 node: Link memory nodes to their compute nodes :::::: TO: Keith Busch <keith.busch(a)intel.com> :::::: CC: Yang Yingliang <yangyingliang(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 3407/3407] kernel/watchdog_hld.c:502:12: warning: no previous prototype for function '__hardlockup_detector_perf_init'
by kernel test robot 13 Dec '25

13 Dec '25
Hi Wei, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: da8948fdddb84e5496272bab85973165594dd469 commit: 364de98eacea8dbfe4f926f62085aebf8534f403 [3407/3407] watchdog: Fix sleeping function called from atomic context config: x86_64-randconfig-005-20251212 (https://download.01.org/0day-ci/archive/20251213/202512130732.r3cU7k46-lkp@…) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 1335a05ab8bc8339ce24be3a9da89d8c3f4e0571) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512130732.r3cU7k46-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/202512130732.r3cU7k46-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from <built-in>:2: In file included from include/linux/compiler_types.h:69: include/linux/compiler-clang.h:34:9: warning: '__SANITIZE_ADDRESS__' macro redefined [-Wmacro-redefined] 34 | #define __SANITIZE_ADDRESS__ | ^ <built-in>:353:9: note: previous definition is here 353 | #define __SANITIZE_ADDRESS__ 1 | ^ >> kernel/watchdog_hld.c:502:12: warning: no previous prototype for function '__hardlockup_detector_perf_init' [-Wmissing-prototypes] 502 | int __init __hardlockup_detector_perf_init(void *not_used) | ^ kernel/watchdog_hld.c:502:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 502 | int __init __hardlockup_detector_perf_init(void *not_used) | ^ | static 2 warnings generated. vim +/__hardlockup_detector_perf_init +502 kernel/watchdog_hld.c 501 > 502 int __init __hardlockup_detector_perf_init(void *not_used) 503 { 504 int ret = hardlockup_detector_event_create(); 505 506 if (ret) { 507 pr_info("Perf NMI watchdog permanently disabled\n"); 508 } else { 509 perf_event_release_kernel(this_cpu_read(watchdog_ev)); 510 this_cpu_write(watchdog_ev, NULL); 511 } 512 return ret; 513 } 514 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1941/1941] mm/khugepaged.c:1336: warning: Function parameter or member 'reliable' not described in 'collapse_shmem'
by kernel test robot 13 Dec '25

13 Dec '25
Hi Ma, First bad commit (maybe != root cause): tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: df8d11fbcbb07177c2500e63d7f5a36063977596 commit: ff0fb9e816fac221fa24a1810dd895745406070b [1941/1941] mm: thp: Add memory reliable support for hugepaged collapse config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20251213/202512130008.Kt184RUn-lkp@…) compiler: aarch64-linux-gcc (GCC) 15.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512130008.Kt184RUn-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/202512130008.Kt184RUn-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/khugepaged.c:1336: warning: Function parameter or member 'mm' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'mapping' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'start' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'hpage' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'node' not described in 'collapse_shmem' >> mm/khugepaged.c:1336: warning: Function parameter or member 'reliable' not described in 'collapse_shmem' vim +1336 mm/khugepaged.c f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1314 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1315 /** f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1316 * collapse_shmem - collapse small tmpfs/shmem pages into huge one. f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1317 * f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1318 * Basic scheme is simple, details are more complex: af24c01831e4e2 Hugh Dickins 2018-11-30 1319 * - allocate and lock a new huge page; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1320 * - scan over radix tree replacing old pages the new one f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1321 * + swap in pages if necessary; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1322 * + fill in gaps; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1323 * + keep old pages around in case if rollback is required; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1324 * - if replacing succeed: f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1325 * + copy data over; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1326 * + free old pages; af24c01831e4e2 Hugh Dickins 2018-11-30 1327 * + unlock huge page; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1328 * - if replacing failed; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1329 * + put all pages back and unfreeze them; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1330 * + restore gaps in the radix-tree; af24c01831e4e2 Hugh Dickins 2018-11-30 1331 * + unlock and free huge page; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1332 */ f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1333 static void collapse_shmem(struct mm_struct *mm, f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1334 struct address_space *mapping, pgoff_t start, ff0fb9e816fac2 Ma Wupeng 2022-02-09 1335 struct page **hpage, int node, bool reliable) f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 @1336 { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1337 gfp_t gfp; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1338 struct page *page, *new_page, *tmp; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1339 struct mem_cgroup *memcg; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1340 pgoff_t index, end = start + HPAGE_PMD_NR; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1341 LIST_HEAD(pagelist); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1342 struct radix_tree_iter iter; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1343 void **slot; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1344 int nr_none = 0, result = SCAN_SUCCEED; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1345 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1346 VM_BUG_ON(start & (HPAGE_PMD_NR - 1)); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1347 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1348 /* Only allocate from the target node */ 41b6167e8f746b Michal Hocko 2017-01-10 1349 gfp = alloc_hugepage_khugepaged_gfpmask() | __GFP_THISNODE; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1350 ff0fb9e816fac2 Ma Wupeng 2022-02-09 1351 if (reliable) ff0fb9e816fac2 Ma Wupeng 2022-02-09 1352 gfp |= ___GFP_RELIABILITY; ff0fb9e816fac2 Ma Wupeng 2022-02-09 1353 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1354 new_page = khugepaged_alloc_page(hpage, gfp, node); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1355 if (!new_page) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1356 result = SCAN_ALLOC_HUGE_PAGE_FAIL; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1357 goto out; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1358 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1359 2a70f6a76bb86d Michal Hocko 2018-04-10 1360 if (unlikely(mem_cgroup_try_charge(new_page, mm, gfp, &memcg, true))) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1361 result = SCAN_CGROUP_CHARGE_FAIL; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1362 goto out; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1363 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1364 3e9646c76cb91d Hugh Dickins 2018-11-30 1365 __SetPageLocked(new_page); 3e9646c76cb91d Hugh Dickins 2018-11-30 1366 __SetPageSwapBacked(new_page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1367 new_page->index = start; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1368 new_page->mapping = mapping; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1369 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1370 /* af24c01831e4e2 Hugh Dickins 2018-11-30 1371 * At this point the new_page is locked and not up-to-date. af24c01831e4e2 Hugh Dickins 2018-11-30 1372 * It's safe to insert it into the page cache, because nobody would af24c01831e4e2 Hugh Dickins 2018-11-30 1373 * be able to map it or use it in another way until we unlock it. f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1374 */ f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1375 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1376 index = start; b93b016313b3ba Matthew Wilcox 2018-04-10 1377 xa_lock_irq(&mapping->i_pages); b93b016313b3ba Matthew Wilcox 2018-04-10 1378 radix_tree_for_each_slot(slot, &mapping->i_pages, &iter, start) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1379 int n = min(iter.index, end) - index; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1380 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1381 /* 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1382 * Stop if extent has been hole-punched, and is now completely 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1383 * empty (the more obvious i_size_read() check would take an 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1384 * irq-unsafe seqlock on 32-bit). 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1385 */ 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1386 if (n >= HPAGE_PMD_NR) { 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1387 result = SCAN_TRUNCATED; 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1388 goto tree_locked; 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1389 } 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1390 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1391 /* f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1392 * Handle holes in the radix tree: charge it from shmem and f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1393 * insert relevant subpage of new_page into the radix-tree. f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1394 */ f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1395 if (n && !shmem_charge(mapping->host, n)) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1396 result = SCAN_FAIL; 3e9646c76cb91d Hugh Dickins 2018-11-30 1397 goto tree_locked; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1398 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1399 for (; index < min(iter.index, end); index++) { b93b016313b3ba Matthew Wilcox 2018-04-10 1400 radix_tree_insert(&mapping->i_pages, index, f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1401 new_page + (index % HPAGE_PMD_NR)); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1402 } 3e9646c76cb91d Hugh Dickins 2018-11-30 1403 nr_none += n; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1404 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1405 /* We are done. */ f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1406 if (index >= end) f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1407 break; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1408 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1409 page = radix_tree_deref_slot_protected(slot, b93b016313b3ba Matthew Wilcox 2018-04-10 1410 &mapping->i_pages.xa_lock); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1411 if (radix_tree_exceptional_entry(page) || !PageUptodate(page)) { b93b016313b3ba Matthew Wilcox 2018-04-10 1412 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1413 /* swap in or instantiate fallocated page */ f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1414 if (shmem_getpage(mapping->host, index, &page, f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1415 SGP_NOHUGE)) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1416 result = SCAN_FAIL; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1417 goto tree_unlocked; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1418 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1419 } else if (trylock_page(page)) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1420 get_page(page); 3e9646c76cb91d Hugh Dickins 2018-11-30 1421 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1422 } else { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1423 result = SCAN_PAGE_LOCK; 3e9646c76cb91d Hugh Dickins 2018-11-30 1424 goto tree_locked; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1425 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1426 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1427 /* b93b016313b3ba Matthew Wilcox 2018-04-10 1428 * The page must be locked, so we can drop the i_pages lock f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1429 * without racing with truncate. f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1430 */ f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1431 VM_BUG_ON_PAGE(!PageLocked(page), page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1432 VM_BUG_ON_PAGE(!PageUptodate(page), page); 8b37c40503eadc Hugh Dickins 2018-11-30 1433 8b37c40503eadc Hugh Dickins 2018-11-30 1434 /* 8b37c40503eadc Hugh Dickins 2018-11-30 1435 * If file was truncated then extended, or hole-punched, before 8b37c40503eadc Hugh Dickins 2018-11-30 1436 * we locked the first page, then a THP might be there already. 8b37c40503eadc Hugh Dickins 2018-11-30 1437 */ 8b37c40503eadc Hugh Dickins 2018-11-30 1438 if (PageTransCompound(page)) { 8b37c40503eadc Hugh Dickins 2018-11-30 1439 result = SCAN_PAGE_COMPOUND; 8b37c40503eadc Hugh Dickins 2018-11-30 1440 goto out_unlock; 8b37c40503eadc Hugh Dickins 2018-11-30 1441 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1442 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1443 if (page_mapping(page) != mapping) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1444 result = SCAN_TRUNCATED; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1445 goto out_unlock; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1446 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1447 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1448 if (isolate_lru_page(page)) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1449 result = SCAN_DEL_PAGE_LRU; 3e9646c76cb91d Hugh Dickins 2018-11-30 1450 goto out_unlock; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1451 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1452 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1453 if (page_mapped(page)) 977fbdcd5986c9 Matthew Wilcox 2018-01-31 1454 unmap_mapping_pages(mapping, index, 1, false); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1455 b93b016313b3ba Matthew Wilcox 2018-04-10 1456 xa_lock_irq(&mapping->i_pages); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1457 b93b016313b3ba Matthew Wilcox 2018-04-10 1458 slot = radix_tree_lookup_slot(&mapping->i_pages, index); 91a45f71078a65 Johannes Weiner 2016-12-12 1459 VM_BUG_ON_PAGE(page != radix_tree_deref_slot_protected(slot, b93b016313b3ba Matthew Wilcox 2018-04-10 1460 &mapping->i_pages.xa_lock), page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1461 VM_BUG_ON_PAGE(page_mapped(page), page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1462 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1463 /* f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1464 * The page is expected to have page_count() == 3: f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1465 * - we hold a pin on it; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1466 * - one reference from radix tree; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1467 * - one from isolate_lru_page; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1468 */ f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1469 if (!page_ref_freeze(page, 3)) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1470 result = SCAN_PAGE_COUNT; 3e9646c76cb91d Hugh Dickins 2018-11-30 1471 xa_unlock_irq(&mapping->i_pages); 3e9646c76cb91d Hugh Dickins 2018-11-30 1472 putback_lru_page(page); 3e9646c76cb91d Hugh Dickins 2018-11-30 1473 goto out_unlock; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1474 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1475 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1476 /* f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1477 * Add the page to the list to be able to undo the collapse if f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1478 * something go wrong. f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1479 */ f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1480 list_add_tail(&page->lru, &pagelist); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1481 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1482 /* Finally, replace with the new page. */ b93b016313b3ba Matthew Wilcox 2018-04-10 1483 radix_tree_replace_slot(&mapping->i_pages, slot, f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1484 new_page + (index % HPAGE_PMD_NR)); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1485 148deab223b237 Matthew Wilcox 2016-12-14 1486 slot = radix_tree_iter_resume(slot, &iter); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1487 index++; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1488 continue; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1489 out_unlock: f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1490 unlock_page(page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1491 put_page(page); 3e9646c76cb91d Hugh Dickins 2018-11-30 1492 goto tree_unlocked; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1493 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1494 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1495 /* f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1496 * Handle hole in radix tree at the end of the range. f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1497 * This code only triggers if there's nothing in radix tree f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1498 * beyond 'end'. f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1499 */ 3e9646c76cb91d Hugh Dickins 2018-11-30 1500 if (index < end) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1501 int n = end - index; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1502 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1503 /* Stop if extent has been truncated, and is now empty */ 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1504 if (n >= HPAGE_PMD_NR) { 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1505 result = SCAN_TRUNCATED; 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1506 goto tree_locked; 8797f2f4fe0d55 Hugh Dickins 2018-11-30 1507 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1508 if (!shmem_charge(mapping->host, n)) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1509 result = SCAN_FAIL; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1510 goto tree_locked; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1511 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1512 for (; index < end; index++) { b93b016313b3ba Matthew Wilcox 2018-04-10 1513 radix_tree_insert(&mapping->i_pages, index, f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1514 new_page + (index % HPAGE_PMD_NR)); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1515 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1516 nr_none += n; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1517 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1518 3e9646c76cb91d Hugh Dickins 2018-11-30 1519 __inc_node_page_state(new_page, NR_SHMEM_THPS); 3e9646c76cb91d Hugh Dickins 2018-11-30 1520 if (nr_none) { 3e9646c76cb91d Hugh Dickins 2018-11-30 1521 struct zone *zone = page_zone(new_page); 3e9646c76cb91d Hugh Dickins 2018-11-30 1522 3e9646c76cb91d Hugh Dickins 2018-11-30 1523 __mod_node_page_state(zone->zone_pgdat, NR_FILE_PAGES, nr_none); 3e9646c76cb91d Hugh Dickins 2018-11-30 1524 __mod_node_page_state(zone->zone_pgdat, NR_SHMEM, nr_none); 3e9646c76cb91d Hugh Dickins 2018-11-30 1525 } 3e9646c76cb91d Hugh Dickins 2018-11-30 1526 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1527 tree_locked: b93b016313b3ba Matthew Wilcox 2018-04-10 1528 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1529 tree_unlocked: f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1530 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1531 if (result == SCAN_SUCCEED) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1532 /* f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1533 * Replacing old pages with new one has succeed, now we need to f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1534 * copy the content and free old pages. f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1535 */ ee13d69bc1e8a5 Hugh Dickins 2018-11-30 1536 index = start; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1537 list_for_each_entry_safe(page, tmp, &pagelist, lru) { ee13d69bc1e8a5 Hugh Dickins 2018-11-30 1538 while (index < page->index) { ee13d69bc1e8a5 Hugh Dickins 2018-11-30 1539 clear_highpage(new_page + (index % HPAGE_PMD_NR)); ee13d69bc1e8a5 Hugh Dickins 2018-11-30 1540 index++; ee13d69bc1e8a5 Hugh Dickins 2018-11-30 1541 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1542 copy_highpage(new_page + (page->index % HPAGE_PMD_NR), f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1543 page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1544 list_del(&page->lru); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1545 page->mapping = NULL; 3e9646c76cb91d Hugh Dickins 2018-11-30 1546 page_ref_unfreeze(page, 1); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1547 ClearPageActive(page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1548 ClearPageUnevictable(page); 3e9646c76cb91d Hugh Dickins 2018-11-30 1549 unlock_page(page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1550 put_page(page); ee13d69bc1e8a5 Hugh Dickins 2018-11-30 1551 index++; ee13d69bc1e8a5 Hugh Dickins 2018-11-30 1552 } ee13d69bc1e8a5 Hugh Dickins 2018-11-30 1553 while (index < end) { ee13d69bc1e8a5 Hugh Dickins 2018-11-30 1554 clear_highpage(new_page + (index % HPAGE_PMD_NR)); ee13d69bc1e8a5 Hugh Dickins 2018-11-30 1555 index++; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1556 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1557 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1558 SetPageUptodate(new_page); af24c01831e4e2 Hugh Dickins 2018-11-30 1559 page_ref_add(new_page, HPAGE_PMD_NR - 1); 3e9646c76cb91d Hugh Dickins 2018-11-30 1560 set_page_dirty(new_page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1561 mem_cgroup_commit_charge(new_page, memcg, false, true); 9d5425af85abe3 Chris Down 2021-06-30 1562 count_memcg_events(memcg, THP_COLLAPSE_ALLOC, 1); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1563 lru_cache_add_anon(new_page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1564 3e9646c76cb91d Hugh Dickins 2018-11-30 1565 /* 3e9646c76cb91d Hugh Dickins 2018-11-30 1566 * Remove pte page tables, so we can re-fault the page as huge. 3e9646c76cb91d Hugh Dickins 2018-11-30 1567 */ 3e9646c76cb91d Hugh Dickins 2018-11-30 1568 retract_page_tables(mapping, start); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1569 *hpage = NULL; 87aa752906ecf6 Yang Shi 2018-08-17 1570 87aa752906ecf6 Yang Shi 2018-08-17 1571 khugepaged_pages_collapsed++; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1572 } else { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1573 /* Something went wrong: rollback changes to the radix-tree */ b93b016313b3ba Matthew Wilcox 2018-04-10 1574 xa_lock_irq(&mapping->i_pages); 78141aabfbb956 Hugh Dickins 2018-11-30 1575 mapping->nrpages -= nr_none; 78141aabfbb956 Hugh Dickins 2018-11-30 1576 shmem_uncharge(mapping->host, nr_none); 78141aabfbb956 Hugh Dickins 2018-11-30 1577 b93b016313b3ba Matthew Wilcox 2018-04-10 1578 radix_tree_for_each_slot(slot, &mapping->i_pages, &iter, start) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1579 if (iter.index >= end) f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1580 break; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1581 page = list_first_entry_or_null(&pagelist, f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1582 struct page, lru); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1583 if (!page || iter.index < page->index) { f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1584 if (!nr_none) f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1585 break; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1586 nr_none--; 59749e6ce53735 Johannes Weiner 2016-12-12 1587 /* Put holes back where they were */ b93b016313b3ba Matthew Wilcox 2018-04-10 1588 radix_tree_delete(&mapping->i_pages, iter.index); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1589 continue; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1590 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1591 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1592 VM_BUG_ON_PAGE(page->index != iter.index, page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1593 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1594 /* Unfreeze the page. */ f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1595 list_del(&page->lru); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1596 page_ref_unfreeze(page, 2); b93b016313b3ba Matthew Wilcox 2018-04-10 1597 radix_tree_replace_slot(&mapping->i_pages, slot, page); 148deab223b237 Matthew Wilcox 2016-12-14 1598 slot = radix_tree_iter_resume(slot, &iter); b93b016313b3ba Matthew Wilcox 2018-04-10 1599 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1600 unlock_page(page); 3e9646c76cb91d Hugh Dickins 2018-11-30 1601 putback_lru_page(page); b93b016313b3ba Matthew Wilcox 2018-04-10 1602 xa_lock_irq(&mapping->i_pages); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1603 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1604 VM_BUG_ON(nr_none); b93b016313b3ba Matthew Wilcox 2018-04-10 1605 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1606 f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1607 mem_cgroup_cancel_charge(new_page, memcg, true); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1608 new_page->mapping = NULL; f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1609 } 3e9646c76cb91d Hugh Dickins 2018-11-30 1610 3e9646c76cb91d Hugh Dickins 2018-11-30 1611 unlock_page(new_page); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1612 out: f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1613 VM_BUG_ON(!list_empty(&pagelist)); f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1614 /* TODO: tracepoints */ f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1615 } f3f0e1d2150b2b Kirill A. Shutemov 2016-07-26 1616 :::::: The code at line 1336 was first introduced by commit :::::: f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 khugepaged: add support of collapse for tmpfs/shmem pages :::::: TO: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com> :::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • ...
  • 2194
  • Older →

HyperKitty Powered by HyperKitty