All of lore.kernel.org
 help / color / mirror / Atom feed
* [jfern:rcu/kfree 10/21] kernel/rcu/tree.c:2948:4: error: implicit declaration of function 'vfree'
@ 2020-04-02  9:23 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-04-02  9:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4515 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git rcu/kfree
head:   77db781336d8ec5870fadda9b5a0ecab8152a0f5
commit: b6debe683c7a2ae86611ad4f69f3582348fc30c8 [10/21] rcu/tree: Maintain separate array for vmalloc ptrs
config: mips-malta_kvm_defconfig (attached as .config)
compiler: mipsel-linux-gcc (GCC) 5.5.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 b6debe683c7a2ae86611ad4f69f3582348fc30c8
        # save the attached .config to linux build tree
        GCC_VERSION=5.5.0 make.cross ARCH=mips 

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

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' [-Werror=implicit-function-declaration]
       vfree(bvhead->records[i]);
       ^
   cc1: some warnings being treated as errors

vim +/vfree +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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 20882 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-02  9:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02  9:23 [jfern:rcu/kfree 10/21] kernel/rcu/tree.c:2948:4: error: implicit declaration of function 'vfree' kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.