]> git.baikalelectronics.ru Git - kernel.git/commit
drivers, xen: convert grant_map.users from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Mon, 6 Mar 2017 14:21:16 +0000 (16:21 +0200)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Mon, 13 Mar 2017 16:45:18 +0000 (12:45 -0400)
commit60354afeffd79a3b5f026e364b82ad9fb8c3386b
tree8c96894513de6ecef4ca4cd333e1a5840ca94fb7
parent83ef760f5a4c4c816b20ce89f194042ed434e0b7
drivers, xen: convert grant_map.users 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: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/gntdev.c