linux/tools/testing
Matthew Wilcox 4ecd9542db ida: Free correct IDA bitmap
There's a relatively rare race where we look at the per-cpu preallocated
IDA bitmap, see it's NULL, allocate a new one, and atomically update it.
If the kmalloc() happened to sleep and we were rescheduled to a different
CPU, or an interrupt came in at the exact right time, another task
might have successfully allocated a bitmap and already deposited it.
I forgot what the semantics of cmpxchg() were and ended up freeing the
wrong bitmap leading to KASAN reporting a use-after-free.

Dmitry found the bug with syzkaller & wrote the patch.  I wrote the test
case that will reproduce the bug without his patch being applied.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
2017-03-07 13:18:23 -05:00
..
fault-injection fault-injection: fix failcmd.sh warning 2012-07-31 18:42:38 -07:00
ktest These are various fixes that I have made and never got around to pushing. 2017-02-27 23:07:59 -08:00
nvdimm Merge branch 'for-4.10/libnvdimm' into libnvdimm-for-next 2016-12-17 15:08:10 -08:00
radix-tree ida: Free correct IDA bitmap 2017-03-07 13:18:23 -05:00
selftests tools/testing/selftests/sigaltstack/sas.c: improve output of sigaltstack testcase 2017-02-27 18:43:45 -08:00