]> git.baikalelectronics.ru Git - kernel.git/commit
dm crypt: fix async inc_pending
authorMilan Broz <mbroz@redhat.com>
Fri, 10 Oct 2008 12:37:07 +0000 (13:37 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 10 Oct 2008 12:37:07 +0000 (13:37 +0100)
commit5414415d3435afcc56872ff59f038396b24da3be
treec21382942df3b7dd363bca91fe5cd8fef3c64f0b
parent161882df4eec54fa071366cab50b2be506f77d33
dm crypt: fix async inc_pending

The pending reference count must be incremented *before* the async work is
queued to another thread, not after.  Otherwise there's a race if the
work completes and decrements the reference count before it gets incremented.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-crypt.c