linux/drivers/s390
Elena Reshetova 0462d9921e vmur: convert urdev.ref_count from atomic_t to refcount_t
atomic_t variables are currently used to implement reference
counters with the following properties:
 - counter is initialized to 1 using atomic_set()
 - a resource is freed upon counter reaching zero
 - once counter reaches zero, its further
   increments aren't allowed
 - counter schema uses basic atomic operations
   (set, inc, inc_not_zero, dec_and_test, etc.)

Such atomic variables should be converted to a newly provided
refcount_t type and API that prevents accidental counter overflows
and underflows. This is important since overflows and underflows
can lead to use-after-free situation and be exploitable.

The variable urdev.ref_count is used as pure reference counter.
Convert it to refcount_t and fix up the operations.

Suggested-by: Kees Cook <keescook@chromium.org>
Reviewed-by: David Windsor <dwindsor@gmail.com>
Reviewed-by: Hans Liljestrand <ishkamiel@gmail.com>
Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2017-10-26 08:36:38 +02:00
..
block s390/dasd: remove unused debug macros 2017-10-18 14:11:26 +02:00
char vmur: convert urdev.ref_count from atomic_t to refcount_t 2017-10-26 08:36:38 +02:00
cio s390/debug: improve debug_event 2017-10-18 14:11:19 +02:00
crypto s390/zcrypt: Introduce QACT support for AP bus devices. 2017-10-23 09:07:14 +02:00
net s390/ccwgroup: tie a ccwgroup driver to its ccw driver 2017-09-29 15:51:30 +02:00
scsi scsi: zfcp: early returns for traces disabled via level 2017-08-10 19:37:03 -04:00
virtio s390/virtio: simplify Makefile 2017-09-29 15:51:53 +02:00
Makefile