linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: kbuild test robot <lkp@intel.com>
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>,
	kbuild-all@01.org, linux-kernel@vger.kernel.org
Subject: Re: [rcu:dev.2019.09.23a 65/77] kernel//rcu/tree.c:2770:3: error: implicit declaration of function 'kfree'; did you mean 'kvfree'?
Date: Tue, 24 Sep 2019 07:56:26 -0700	[thread overview]
Message-ID: <20190924145626.GA2689@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <201909241053.itpSv0OR%lkp@intel.com>

On Tue, Sep 24, 2019 at 10:21:54AM +0800, kbuild test robot wrote:
> tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2019.09.23a
> head:   97de53b94582c208ee239178b208b8e8b9472585
> commit: 06b68648e6084488b79de47a2cfa307a1b9668b9 [65/77] rcu: Remove kfree_rcu() special casing and lazy-callback handling
> config: x86_64-randconfig-c004-201938 (attached as .config)
> compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
> reproduce:
>         git checkout 06b68648e6084488b79de47a2cfa307a1b9668b9
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> 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:2770:3: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
>       kfree((void *)head - offset);
>       ^~~~~
>       kvfree
>    cc1: some warnings being treated as errors

Good catch, missing #include of slab.h, fix posted to be squashed with
the original commit.

							Thanx, Paul

> vim +2770 kernel//rcu/tree.c
> 
>   2739	
>   2740	/*
>   2741	 * This function is invoked in workqueue context after a grace period.
>   2742	 * It frees all the objects queued on ->head_free.
>   2743	 */
>   2744	static void kfree_rcu_work(struct work_struct *work)
>   2745	{
>   2746		unsigned long flags;
>   2747		struct rcu_head *head, *next;
>   2748		struct kfree_rcu_cpu *krcp;
>   2749		struct kfree_rcu_cpu_work *krwp;
>   2750	
>   2751		krwp = container_of(to_rcu_work(work),
>   2752				    struct kfree_rcu_cpu_work, rcu_work);
>   2753		krcp = krwp->krcp;
>   2754		spin_lock_irqsave(&krcp->lock, flags);
>   2755		head = krwp->head_free;
>   2756		krwp->head_free = NULL;
>   2757		spin_unlock_irqrestore(&krcp->lock, flags);
>   2758	
>   2759		// List "head" is now private, so traverse locklessly.
>   2760		for (; head; head = next) {
>   2761			unsigned long offset = (unsigned long)head->func;
>   2762	
>   2763			next = head->next;
>   2764			// Potentially optimize with kfree_bulk in future.
>   2765			debug_rcu_head_unqueue(head);
>   2766			rcu_lock_acquire(&rcu_callback_map);
>   2767			trace_rcu_invoke_kfree_callback(rcu_state.name, head, offset);
>   2768	
>   2769			/* Could be possible to optimize with kfree_bulk in future */
> > 2770			kfree((void *)head - offset);
>   2771	
>   2772			rcu_lock_release(&rcu_callback_map);
>   2773			cond_resched_tasks_rcu_qs();
>   2774		}
>   2775	}
>   2776	
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



      reply	other threads:[~2019-09-24 14:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24  2:21 [rcu:dev.2019.09.23a 65/77] kernel//rcu/tree.c:2770:3: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? kbuild test robot
2019-09-24 14:56 ` Paul E. McKenney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190924145626.GA2689@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=joel@joelfernandes.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).