diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-03-18 15:05:53 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-03-18 18:34:15 -0500 |
commit | 334e94de9bea353156abd6f2242d3cc4a24562b0 (patch) | |
tree | ff4a253e9e3bf487be03bf58727a7ea40a34ba87 /block/ll_rw_blk.c | |
parent | e17a9489b4a686bb5e9615e1d375c67619cb99c5 (diff) | |
download | op-kernel-dev-334e94de9bea353156abd6f2242d3cc4a24562b0.zip op-kernel-dev-334e94de9bea353156abd6f2242d3cc4a24562b0.tar.gz |
[PATCH] deal with rmmod/put_io_context() races
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r-- | block/ll_rw_blk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index caa8fcf..6dc7691 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -3477,10 +3477,12 @@ void put_io_context(struct io_context *ioc) BUG_ON(atomic_read(&ioc->refcount) == 0); if (atomic_dec_and_test(&ioc->refcount)) { + rcu_read_lock(); if (ioc->aic && ioc->aic->dtor) ioc->aic->dtor(ioc->aic); if (ioc->cic && ioc->cic->dtor) ioc->cic->dtor(ioc->cic); + rcu_read_unlock(); kmem_cache_free(iocontext_cachep, ioc); } |