lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 1 Apr 2020 21:10:40 +0800
From:   kbuild test robot <lkp@...el.com>
To:     "Uladzislau Rezki (Sony)" <urezki@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        "Paul E. McKenney" <paulmck@...nel.org>,
        "Joel Fernandes (Google)" <joel@...lfernandes.org>
Subject: [rcu:dev.2020.03.30a 99/116] kernel/rcu/tree.c:2948:4: error:
 implicit declaration of function 'vfree'; did you mean 'kfree'?

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: sparc-randconfig-a001-20200401 (attached as .config)
compiler: sparc64-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=sparc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.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'; did you mean 'kfree'? [-Werror=implicit-function-declaration]
    2948 |    vfree(bvhead->records[i]);
         |    ^~~~~
         |    kfree
   cc1: some warnings being treated as errors

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@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (35845 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ