linux/drivers/md/bcache
Kent Overstreet 6aa8f1a6ca bcache: Fix a dumb race
In the far-too-complicated closure code - closures can have destructors,
for probably dubious reasons; they get run after the closure is no
longer waiting on anything but before dropping the parent ref, intended
just for freeing whatever memory the closure is embedded in.

Trouble is, when remaining goes to 0 and we've got nothing more to run -
we also have to unlock the closure, setting remaining to -1. If there's
a destructor, that unlock isn't doing anything - nobody could be trying
to lock it if we're about to free it - but if the unlock _is needed...
that check for a destructor was racy. Argh.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
2013-07-12 00:22:33 -07:00
..
alloc.c bcache: Fix/revamp tracepoints 2013-06-26 17:09:15 -07:00
bcache.h bcache: Write out full stripes 2013-06-26 21:58:04 -07:00
bset.c bcache: Improve lazy sorting 2013-06-26 17:09:16 -07:00
bset.h bcache: Fix/revamp tracepoints 2013-06-26 17:09:15 -07:00
btree.c bcache: Use standard utility code 2013-07-01 14:43:53 -07:00
btree.h bcache: Delete fuzz tester 2013-07-01 14:43:48 -07:00
closure.c bcache: Fix a dumb race 2013-07-12 00:22:33 -07:00
closure.h
debug.c bcache: Use standard utility code 2013-07-01 14:43:53 -07:00
debug.h bcache: Rip out pkey()/pbtree() 2013-06-26 17:09:15 -07:00
io.c bcache: Use standard utility code 2013-07-01 14:43:53 -07:00
journal.c bcache: FUA fixes 2013-07-01 14:42:47 -07:00
journal.h
Kconfig bcache: drop "select CLOSURES" 2013-05-15 00:42:51 -07:00
Makefile
movinggc.c bcache: Use standard utility code 2013-07-01 14:43:53 -07:00
request.c bcache: Use standard utility code 2013-07-01 14:43:53 -07:00
request.h bcache: Fix/revamp tracepoints 2013-06-26 17:09:15 -07:00
stats.c bcache: Fix error handling in init code 2013-05-15 00:48:14 -07:00
stats.h
super.c bcache: Send label uevents 2013-06-26 21:58:06 -07:00
sysfs.c bcache: Send label uevents 2013-06-26 21:58:06 -07:00
sysfs.h bcache: Don't export utility code, prefix with bch_ 2013-03-28 12:50:55 -06:00
trace.c bcache: Rip out pkey()/pbtree() 2013-06-26 17:09:15 -07:00
util.c bcache: Use standard utility code 2013-07-01 14:43:53 -07:00
util.h bcache: Use standard utility code 2013-07-01 14:43:53 -07:00
writeback.c bcache: Use standard utility code 2013-07-01 14:43:53 -07:00
writeback.h bcache: Write out full stripes 2013-06-26 21:58:04 -07:00