public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin LaHaise <bcrl@kvack.org>
To: Zach Brown <zach.brown@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-aio@kvack.org,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: [RFC][PATCH] Fix lock inversion aio_kick_handler()
Date: Fri, 28 Jul 2006 21:34:46 -0400	[thread overview]
Message-ID: <20060729013446.GA3387@kvack.org> (raw)
In-Reply-To: <20060729001032.GA7885@tetsuo.zabbo.net>

On Fri, Jul 28, 2006 at 05:10:32PM -0700, Zach Brown wrote:
> Fix lock inversion aio_kick_handler()

Doh.  Unfortunately, this patch isn't entirely correct as it could race with 
__put_ioctx() which sets ioctx->mm = NULL.  Something like the following 
should do the trick:

	struct mm_struct *mm;
...
> - 	unuse_mm(ctx->mm);
+	mm = ctx->mm;
>  	spin_unlock_irq(&ctx->ctx_lock);
+ 	unuse_mm(mm);
>  	set_fs(oldfs);
>  	/*
...


		-ben
-- 
"Time is of no importance, Mr. President, only life is important."
Don't Email: <dont@kvack.org>.

  reply	other threads:[~2006-07-29  1:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-29  0:10 [RFC][PATCH] Fix lock inversion aio_kick_handler() Zach Brown
2006-07-29  1:34 ` Benjamin LaHaise [this message]
2006-07-29  2:02   ` Zach Brown
2006-11-09 22:41     ` Jeff Moyer
2006-11-09 22:51       ` Zach Brown
2006-11-09 22:57         ` Jeff Moyer

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=20060729013446.GA3387@kvack.org \
    --to=bcrl@kvack.org \
    --cc=arjan@infradead.org \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zach.brown@oracle.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