scsi: libiscsi: qedi: convert iscsi_task.refcount from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Thu, 9 Mar 2017 11:46:58 +0000 (13:46 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 15 Mar 2017 22:44:39 +0000 (18:44 -0400)
commit6dc618cdd6b896791313926becb1f86ede0e046a
treee4b0637932e6f5ce980720b12fc253e6bfcf2b74
parent22c70d1a9c639b432ffdf083bea44752ad9fc8f3
scsi: libiscsi: qedi: convert iscsi_task.refcount 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>
Acked-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libiscsi.c
drivers/scsi/qedi/qedi_iscsi.c
include/scsi/libiscsi.h