public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yong Zhang <yong.zhang@windriver.com>
To: Leon Woestenberg <leon.woestenberg@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: May the worker function free its struct_work (plus container)?
Date: Tue, 11 May 2010 09:27:56 +0800	[thread overview]
Message-ID: <20100511012756.GB18062@windriver.com> (raw)
In-Reply-To: <AANLkTimOrMLWXV8L0V6LQuZLa4QO-adOlxNH190YyU6u@mail.gmail.com>

On Mon, May 10, 2010 at 12:18:38PM +0200, Leon Woestenberg wrote:
> Thanks. Is there API documentation or source code documentation that
> confirms this is the case?

static void run_workqueue(struct cpu_workqueue_struct *cwq)
{
	....

#ifdef CONFIG_LOCKDEP
		/*
		 * It is permissible to free the struct work_struct
		 * from inside the function that is called from it,
		 * this we need to take into account for lockdep too.
		 * To avoid bogus "held lock freed" warnings as well
		 * as problems when looking into work->lockdep_map,
		 * make a copy and use that here.
		 */
		struct lockdep_map lockdep_map = work->lockdep_map;
#endif
	....
}

I think the above comments in run_workqueue() can reflect that
from a certain point.

Thanks,
Yong

      reply	other threads:[~2010-05-11  1:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-09 22:47 May the worker function free its struct_work (plus container)? Leon Woestenberg
2010-05-10  4:52 ` Yong Zhang
2010-05-10 10:18   ` Leon Woestenberg
2010-05-11  1:27     ` Yong Zhang [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=20100511012756.GB18062@windriver.com \
    --to=yong.zhang@windriver.com \
    --cc=leon.woestenberg@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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