]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: libfc: convert fc_fcp_pkt.ref_cnt from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Thu, 9 Mar 2017 07:44:02 +0000 (09:44 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 15 Mar 2017 22:44:02 +0000 (18:44 -0400)
commit5cc4e3eec2c45057390e00d8a6167ad859043200
tree77a5f3bf9d214c2e7abbcd09b309fa17627543a5
parent9e018856a987195509fddde9bf97a3fbab68aeb4
scsi: libfc: convert fc_fcp_pkt.ref_cnt 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: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libfc/fc_fcp.c
include/scsi/libfc.h