]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb1b722e7a5d9b83c56bfe654f753a4a927336401
treea1aa3f65fa046e1ac40b923e97b8b2f36b347c08
parent491620267ec3fa947b29114613f113b2914bf0e4
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