]> git.baikalelectronics.ru Git - kernel.git/commit
drivers, usb: convert ffs_data.ref from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Mon, 6 Mar 2017 14:21:12 +0000 (16:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2017 04:32:59 +0000 (13:32 +0900)
commita03ce562ff637f480085fcaf09fe38cd9c3d078d
treeb8d7a05d962948575b931c54d98072f0b3e33f8f
parent98c0f879897c0c37d9b736a5b47dc6a4157aa41b
drivers, usb: convert ffs_data.ref 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/function/u_fs.h