Skip to content

Commit 078a7ac

Browse files
bvanasschekawasaki
authored andcommitted
check: Suppress kmemleak scanning failures
kmemleak disables itself if an internal error has been encountered. If this happens, any attempt to write into /sys/kernel/debug/kmemleak triggers the error "Operation not permitted". Suppress this error message instead of displaying it on stdout. Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
1 parent 4de1f75 commit 078a7ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ _check_kmemleak() {
233233

234234
((KMEMLEAK)) || return 0
235235

236-
echo scan > "$KMEMLEAK_FILE"
236+
{ echo scan > "$KMEMLEAK_FILE"; } 2>/dev/null || return 0
237237
sleep 1
238238
kmemleak=$(cat "$KMEMLEAK_FILE")
239239

0 commit comments

Comments
 (0)