All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] add execute_in_process_context() API
Date: Tue, 7 Feb 2006 15:26:55 -0500	[thread overview]
Message-ID: <20060207202655.GD24775@redhat.com> (raw)
In-Reply-To: <1139342419.6065.8.camel@mulgrave.il.steeleye.com>

On Tue, Feb 07, 2006 at 02:00:19PM -0600, James Bottomley wrote:
 > +int execute_in_process_context(void (*fn)(void *data), void *data)
 > +{
 > +	struct work_queue_work *wqw;
 > +
 > +	if (!in_interrupt()) {
 > +		fn(data);
 > +		return 0;
 > +	}
 > +
 > +	wqw = kmalloc(sizeof(struct work_queue_work), GFP_ATOMIC);
 > +
 > +	if (unlikely(!wqw)) {
 > +		printk(KERN_ERR "Failed to allocate memory\n");
 > +		WARN_ON(1);
 > +		return -ENOMEM;
 > +	}
 > +
 > +	INIT_WORK(&wqw->work, execute_in_process_context_work, wqw);
 > +	wqw->fn = fn;
 > +	wqw->data = data;
 > +	schedule_work(&wqw->work);
 > +
 > +	return 1;
 > +}

After the workqueue has run, what free's wqw ?

		Dave


  parent reply	other threads:[~2006-02-07 20:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-07 20:00 [PATCH] add execute_in_process_context() API James Bottomley
2006-02-07 20:08 ` [SCSI] fix wrong context bugs in SCSI James Bottomley
2006-02-07 22:05   ` Brian King
2006-02-07 23:26     ` James Bottomley
2006-02-08  8:56   ` Jens Axboe
2006-02-08 15:31     ` James Bottomley
2006-02-08 15:52       ` Jens Axboe
2006-02-14 16:42         ` James Bottomley
2006-02-14 16:48           ` James Bottomley
2006-02-07 20:26 ` Dave Jones [this message]
2006-02-07 20:34   ` [PATCH] add execute_in_process_context() API Andrew Morton
2006-02-08 12:51 ` Stefan Richter
     [not found] <1139342419.6065.8.camel@mulgrave.il.steeleye.com.suse.lists.linux.kernel>
2006-02-08  8:06 ` Andi Kleen
2006-02-08  8:18   ` Andrew Morton
2006-02-08  8:50     ` Andi Kleen
2006-02-08 15:15   ` James Bottomley
2006-02-08 15:18     ` Andi Kleen
2006-02-08 15:57       ` James Bottomley
2006-02-08 16:07         ` Andi Kleen
2006-02-08 15:30     ` Tejun
2006-02-08 15:36       ` James Bottomley

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=20060207202655.GD24775@redhat.com \
    --to=davej@redhat.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@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 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.