]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PCI: hv: Convert hv_pci_dev.refs from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Tue, 18 Apr 2017 14:02:48 +0000 (09:02 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 18 Apr 2017 14:02:48 +0000 (09:02 -0500)
commit24196f0c7d4bba093dfa8074507f31509970319f
treee163056918925d3661f3b4cd80f00e663e34a0e9
parent59c58ceeea9cdc6144d7b0303753e6bd26d87455
PCI: hv: Convert hv_pci_dev.refs 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>
Reviewed-by: Stephen Hemminger <sthemmin@microsoft.com>
drivers/pci/host/pci-hyperv.c