common/rc: fix check for disabled kmemleak
authorAmir Goldstein <amir73il@gmail.com>
Sat, 22 Sep 2018 15:23:39 +0000 (18:23 +0300)
committerEryu Guan <guaneryu@gmail.com>
Sun, 23 Sep 2018 14:26:56 +0000 (22:26 +0800)
commitb55879ea9dbd107edfd3c606624a5fab5a5df0fa
tree91782962b199fcea9a7824c008ea612544908a9d
parentcc8831f9a5e57e614346cece4785262d6151b83f
common/rc: fix check for disabled kmemleak

With kernel commit b353756b2b71 ("kmemleak: always register debugfs
file") that was merged to v4.19-rc3, the kmemleak debugfs knob
exists even if kmemleak is disabled, but returns EBUSY on write.

Suppress EBUSY errors in tests by disabling _check_kmemleak() calls
if the write to kmemleak knob failed on _init_kmemleak().

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc