aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/aio.h
diff options
context:
space:
mode:
authorZach Brown <zach.brown@oracle.com>2005-09-30 11:58:54 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-30 12:41:17 -0700
commit998765e5588b197737d457e16f72832d8036190f (patch)
tree3a87877bffebc776a7102ab1b5f247a45d1c4ab3 /include/linux/aio.h
parentRevert "x86-64: Reverse order of bootmem lists" (diff)
downloadlinux-dev-998765e5588b197737d457e16f72832d8036190f.tar.xz
linux-dev-998765e5588b197737d457e16f72832d8036190f.zip
[PATCH] aio: lock around kiocbTryKick()
Only one of the run or kick path is supposed to put an iocb on the run list. If both of them do it than one of them can end up referencing a freed iocb. The kick patch could set the Kicked bit before acquiring the ctx_lock and putting the iocb on the run list. The run path, while holding the ctx_lock, could see this partial kick and mistake it for a kick that was deferred while it was doing work with the run_list NULLed out. It would then race with the kick thread to add the iocb to the run list. This patch moves the kick setting under the ctx_lock so that only one of the kick or run path queues the iocb on the run list, as intended. Signed-off-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Benjamin LaHaise <bcrl@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/aio.h')
0 files changed, 0 insertions, 0 deletions