[rcu:dev.2020.03.30a 99/116] kernel/rcu/tree.c:2948:4: error: implicit declaration of function 'vfree'; did you mean 'kvfree'?

From: kbuild test robot
Date: Wed Apr 01 2020 - 08:54:11 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2020.03.30a
head: 3cc6f49bd92ebef95e8f98191e27b2fd2600eac0
commit: b76ca6e09d52b27c8157f63ff4131eb8ce7e823f [99/116] rcu/tree: Maintain separate array for vmalloc ptrs
config: sh-j2_defconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b76ca6e09d52b27c8157f63ff4131eb8ce7e823f
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=sh

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

kernel/rcu/tree.c: In function 'kfree_rcu_work':
>> kernel/rcu/tree.c:2948:4: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
2948 | vfree(bvhead->records[i]);
| ^~~~~
| kvfree
{standard input}: Assembler messages:
{standard input}:158: Error: unknown opcode
{standard input}:195: Error: unknown opcode
{standard input}:269: Error: unknown opcode
{standard input}:294: Error: unknown opcode
{standard input}:385: Error: unknown opcode
{standard input}:454: Error: unknown opcode
{standard input}:649: Error: unknown opcode
{standard input}:1219: Error: unknown opcode
{standard input}:1275: Error: unknown opcode
{standard input}:1340: Error: unknown opcode
{standard input}:1706: Error: unknown opcode
{standard input}:1951: Error: unknown opcode
{standard input}:2018: Error: unknown opcode
{standard input}:2230: Error: unknown opcode
{standard input}:2340: Error: unknown opcode
{standard input}:2638: Error: unknown opcode
{standard input}:2683: Error: unknown opcode
{standard input}:2818: Error: unknown opcode
{standard input}:3345: Error: unknown opcode
{standard input}:3364: Error: unknown opcode
{standard input}:3404: Error: unknown opcode
{standard input}:3446: Error: unknown opcode
{standard input}:3457: Error: unknown opcode
{standard input}:4193: Error: unknown opcode
{standard input}:4215: Error: unknown opcode
{standard input}:4275: Error: unknown opcode
{standard input}:4314: Error: unknown opcode
{standard input}:4330: Error: unknown opcode
{standard input}:4382: Error: unknown opcode
{standard input}:5235: Error: unknown opcode
{standard input}:5264: Error: unknown opcode
{standard input}:5332: Error: unknown opcode
{standard input}:5657: Error: unknown opcode
{standard input}:6454: Error: unknown opcode
{standard input}:6841: Error: unknown opcode
{standard input}:6905: Error: unknown opcode
{standard input}:7163: Error: unknown opcode
{standard input}:7195: Error: unknown opcode
{standard input}:7207: Error: unknown opcode
{standard input}:7320: Error: unknown opcode
{standard input}:7337: Error: unknown opcode
{standard input}:7353: Error: unknown opcode
{standard input}:7419: Error: unknown opcode
{standard input}:7428: Error: unknown opcode
{standard input}:7542: Error: unknown opcode
{standard input}:7630: Error: unknown opcode
{standard input}:7663: Error: unknown opcode
{standard input}:7672: Error: unknown opcode
{standard input}:7901: Error: unknown opcode
{standard input}:7991: Error: unknown opcode
{standard input}:8004: Error: unknown opcode
{standard input}:8101: Error: unknown opcode
{standard input}:8277: Error: unknown opcode
{standard input}:8336: Error: unknown opcode
{standard input}:8440: Error: unknown opcode
{standard input}:8941: Error: unknown opcode
{standard input}:8951: Error: unknown opcode
{standard input}:9017: Error: unknown opcode
{standard input}:9088: Error: unknown opcode
{standard input}:9266: Error: unknown opcode
{standard input}:9378: Error: unknown opcode
{standard input}:9845: Error: unknown opcode
{standard input}:9964: Error: unknown opcode
{standard input}:10012: Error: unknown opcode
{standard input}:10054: Error: unknown opcode
{standard input}:10254: Error: unknown opcode
{standard input}:10532: Error: unknown opcode
{standard input}:10605: Error: unknown opcode
{standard input}:10615: Error: unknown opcode
{standard input}:10624: Error: unknown opcode
{standard input}:10670: Error: unknown opcode
{standard input}:11046: Error: unknown opcode
{standard input}:11202: Error: unknown opcode
{standard input}:11250: Error: unknown opcode
{standard input}:11301: Error: unknown opcode
{standard input}:11438: Error: unknown opcode
{standard input}:11754: Error: unknown opcode
{standard input}:11829: Error: unknown opcode
{standard input}:12018: Error: unknown opcode
{standard input}:12027: Error: unknown opcode
{standard input}:12091: Error: unknown opcode
{standard input}:12117: Error: unknown opcode
{standard input}:12213: Error: unknown opcode
{standard input}:12233: Error: unknown opcode
{standard input}:12317: Error: unknown opcode
{standard input}:12486: Error: unknown opcode
{standard input}:12500: Error: unknown opcode
{standard input}:12847: Error: unknown opcode
{standard input}:12905: Error: unknown opcode
{standard input}:13686: Error: unknown opcode
{standard input}:14600: Error: unknown opcode
{standard input}:14612: Error: unknown opcode
{standard input}:14686: Error: unknown opcode
{standard input}:14699: Error: unknown opcode
{standard input}:14746: Error: unknown opcode
{standard input}:14754: Error: unknown opcode

vim +2948 kernel/rcu/tree.c

2886
2887 /*
2888 * This function is invoked in workqueue context after a grace period.
2889 * It frees all the objects queued on ->bhead_free or ->head_free.
2890 */
2891 static void kfree_rcu_work(struct work_struct *work)
2892 {
2893 unsigned long flags;
2894 struct kvfree_rcu_bulk_data *bkhead, *bknext;
2895 struct kvfree_rcu_bulk_data *bvhead, *bvnext;
2896 struct rcu_head *head, *next;
2897 struct kfree_rcu_cpu *krcp;
2898 struct kfree_rcu_cpu_work *krwp;
2899 int i;
2900
2901 krwp = container_of(to_rcu_work(work),
2902 struct kfree_rcu_cpu_work, rcu_work);
2903
2904 krcp = krwp->krcp;
2905 spin_lock_irqsave(&krcp->lock, flags);
2906 /* Channel 1. */
2907 bkhead = krwp->bkvhead_free[0];
2908 krwp->bkvhead_free[0] = NULL;
2909
2910 /* Channel 2. */
2911 bvhead = krwp->bkvhead_free[1];
2912 krwp->bkvhead_free[1] = NULL;
2913
2914 /* Channel 3. */
2915 head = krwp->head_free;
2916 krwp->head_free = NULL;
2917 spin_unlock_irqrestore(&krcp->lock, flags);
2918
2919 /* kmalloc()/kfree() channel. */
2920 for (; bkhead; bkhead = bknext) {
2921 bknext = bkhead->next;
2922
2923 debug_rcu_bhead_unqueue(bkhead);
2924
2925 rcu_lock_acquire(&rcu_callback_map);
2926 trace_rcu_invoke_kfree_bulk_callback(rcu_state.name,
2927 bkhead->nr_records, bkhead->records);
2928
2929 kfree_bulk(bkhead->nr_records, bkhead->records);
2930 rcu_lock_release(&rcu_callback_map);
2931
2932 if (cmpxchg(&krcp->bkvcache[0], NULL, bkhead))
2933 free_page((unsigned long) bkhead);
2934
2935 cond_resched_tasks_rcu_qs();
2936 }
2937
2938 /* vmalloc()/vfree() channel. */
2939 for (; bvhead; bvhead = bvnext) {
2940 bvnext = bvhead->next;
2941
2942 debug_rcu_bhead_unqueue(bvhead);
2943
2944 rcu_lock_acquire(&rcu_callback_map);
2945 for (i = 0; i < bvhead->nr_records; i++) {
2946 trace_rcu_invoke_kvfree_callback(rcu_state.name,
2947 (struct rcu_head *) bvhead->records[i], 0);
> 2948 vfree(bvhead->records[i]);
2949 }
2950 rcu_lock_release(&rcu_callback_map);
2951
2952 if (cmpxchg(&krcp->bkvcache[1], NULL, bvhead))
2953 free_page((unsigned long) bvhead);
2954
2955 cond_resched_tasks_rcu_qs();
2956 }
2957
2958 /*
2959 * This path covers emergency case only due to high
2960 * memory pressure also means low memory condition,
2961 * when we could not allocate a bulk array.
2962 *
2963 * Under that condition an object is queued to the
2964 * list instead.
2965 */
2966 for (; head; head = next) {
2967 unsigned long offset = (unsigned long)head->func;
2968 void *ptr = (void *)head - offset;
2969
2970 next = head->next;
2971 debug_rcu_head_unqueue((struct rcu_head *)ptr);
2972 rcu_lock_acquire(&rcu_callback_map);
2973 trace_rcu_invoke_kvfree_callback(rcu_state.name, head, offset);
2974
2975 if (!WARN_ON_ONCE(!__is_kvfree_rcu_offset(offset)))
2976 kvfree(ptr);
2977
2978 rcu_lock_release(&rcu_callback_map);
2979 cond_resched_tasks_rcu_qs();
2980 }
2981 }
2982

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip