]> git.baikalelectronics.ru Git - kernel.git/commit
fs, nfs: convert pnfs_layout_segment.pls_refcount from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Fri, 20 Oct 2017 09:53:32 +0000 (12:53 +0300)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 17 Nov 2017 18:47:59 +0000 (13:47 -0500)
commitbdf4ec535acc53e044ecbb07b8ae251ffcbc4946
treee6b14b8b629462d1e7707bd32536292e91bccef0
parentc30f7b4436cf0877ebb4ae8243fcb2d3037aceee
fs, nfs: convert pnfs_layout_segment.pls_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>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/pnfs.c
fs/nfs/pnfs.h