From: Suparna Bhattacharya <suparna@in.ibm.com>
To: akpm@osdl.org
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, linux-aio@kvack.org
Subject: [PATCH][2.6-mm] Fix AIO and 4G-4G hang
Date: Thu, 9 Oct 2003 11:04:56 +0530 [thread overview]
Message-ID: <20031009053456.GA11323@in.ibm.com> (raw)
This patch appears to fix the hangs seen with AIO and
4G-4G for me. It ensures that the indirect versions of
copy_xxx_user are used during aio retries running in
worker thread context (i.e. access aio issuer's user-space
instead of kernel-space).
Regards
Suparna
--
Suparna Bhattacharya (suparna@in.ibm.com)
Linux Technology Center
IBM Software Labs, India
-------------------------------------------------------
diffstat aio-4g4g-fix.patch
aio.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
--- 260t5mm2/fs/aio.c Fri Sep 19 15:15:39 2003
+++ linux-2.6.0-test5-mm4/fs/aio.c Tue Oct 7 23:40:22 2003
@@ -805,18 +814,23 @@ static inline void aio_run_iocbs(struct
* aio_kick_handler:
* Work queue handler triggered to process pending
* retries on an ioctx. Takes on the aio issuer's
- * mm context before running the iocbs.
+ * mm context before running the iocbs, so that
+ * copy_xxx_user operates on the issuer's address
+ * space.
* Run on aiod's context.
*/
static void aio_kick_handler(void *data)
{
struct kioctx *ctx = data;
+ mm_segment_t oldfs = get_fs();
+ set_fs(USER_DS);
use_mm(ctx->mm);
spin_lock_irq(&ctx->ctx_lock);
__aio_run_iocbs(ctx);
unuse_mm(ctx->mm);
spin_unlock_irq(&ctx->ctx_lock);
+ set_fs(oldfs);
}
reply other threads:[~2003-10-09 5:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20031009053456.GA11323@in.ibm.com \
--to=suparna@in.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-aio@kvack.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.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 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.