target/iblock: convert iblock_req.pending from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Mon, 6 Mar 2017 14:21:11 +0000 (16:21 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 2 May 2017 05:20:43 +0000 (22:20 -0700)
commit5981c245a890db6a6e16fb6d3838cc9fc9fdf0ff
treea1aa3f65fa046e1ac40b923e97b8b2f36b347c08
parenta5d68ba85801a78c892a0eb8efb711e293ed314b
target/iblock: convert iblock_req.pending from atomic_t to refcount_t

refcount_t type and corresponding API should be
used instead of atomic_t when the variable is used as
a reference counter. This allows to avoid accidental
refcounter overflows that might lead to use-after-free
situations.

Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David Windsor <dwindsor@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_iblock.c
drivers/target/target_core_iblock.h