From 2b1c88827ab90892e2437a0054b16587defe089e Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 2 Oct 2022 13:35:55 +0200 Subject: pkg/report: improve parsing of "nested lock was not taken" Parse the stack trace for the WARNING since the guilty frame is not necessary the first one. Skip iput/ihold functions. They are called dozens of times throughout the kernel and the bug is more likely to be in the caller. --- pkg/report/linux.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pkg/report/linux.go') diff --git a/pkg/report/linux.go b/pkg/report/linux.go index 57d2ad10a..5626c0569 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -1206,6 +1206,9 @@ var linuxStackParams = &stackParams{ "^crc\\d+", "__might_resched", "assertfail", + "^iput$", + "^iput_final$", + "^ihold$", }, corruptedLines: []*regexp.Regexp{ // Fault injection stacks are frequently intermixed with crash reports. @@ -1634,9 +1637,9 @@ var linuxOopses = append([]*oops{ fmt: "WARNING: still has locks held in %[1]v", }, { - title: compile("WARNING: Nested lock was not taken"), - report: compile("WARNING: Nested lock was not taken(?:.*\\n)+?.*at: {{FUNC}}"), - fmt: "WARNING: nested lock was not taken in %[1]v", + title: compile("WARNING: Nested lock was not taken"), + fmt: "WARNING: nested lock was not taken in %[1]v", + stack: warningStackFmt(), }, { title: compile("WARNING: lock held when returning to user space"), -- cgit mrf-deployment