]> www.infradead.org Git - users/jedix/linux-maple.git/commit
refcount_t: Introduce a special purpose refcount type
authorPeter Zijlstra <peterz@infradead.org>
Mon, 14 Nov 2016 17:06:19 +0000 (18:06 +0100)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Thu, 16 Nov 2017 21:04:53 +0000 (13:04 -0800)
commit717d3815c4273e4d87606559269553cf45295c22
tree2c8bff5226458a7bfdcabc5a053f962f0cb7b00c
parent875e9ca95f8020215460db193cc5059c2c8943eb
refcount_t: Introduce a special purpose refcount type

Provide refcount_t, an atomic_t like primitive built just for
refcounting.

It provides saturation semantics such that overflow becomes impossible
and thereby 'spurious' use-after-free is avoided.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit f405df5de3170c00e5c54f8b7cf4766044a032ba)

Orabug: 27050772
CVE: CVE-2017-15649

Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
include/linux/refcount.h [new file with mode: 0644]
lib/Kconfig.debug