aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2017-12-11 15:34:41 +0100
committerAndrey Konovalov <andreyknvl@gmail.com>2017-12-11 16:01:10 +0100
commit8d4ab426054a7bc7a3e16819155356bdb746e413 (patch)
tree1ddc46555062f66182a430f54cb8d6e202012ab0 /pkg
parentc0020ec1977c811f8e7c888a5662cc2c7abd627d (diff)
pkg/report: bad unlock balance can be a WARNING
Diffstat (limited to 'pkg')
-rw-r--r--pkg/report/linux.go11
-rw-r--r--pkg/report/linux_test.go43
2 files changed, 54 insertions, 0 deletions
diff --git a/pkg/report/linux.go b/pkg/report/linux.go
index a37104c2d..5f966c8db 100644
--- a/pkg/report/linux.go
+++ b/pkg/report/linux.go
@@ -637,6 +637,17 @@ var linuxOopses = []*oops{
fmt: "WARNING: kernel stack frame pointer has bad value",
noStackTrace: true,
},
+ {
+ title: compile("WARNING: bad unlock balance detected!(?:.*\\n)+?.*{{PC}} +{{FUNC}}"),
+ report: compile("WARNING: bad unlock balance detected!(?:.*\\n){0,5}?.*is trying to release lock"),
+ fmt: "WARNING: bad unlock balance in %[1]v",
+ },
+ {
+ // If we failed to extract function name where the fault happened, the report is most likely truncated.
+ title: compile("WARNING: bad unlock balance detected!"),
+ fmt: "WARNING: bad unlock balance",
+ corrupted: true,
+ },
},
[]*regexp.Regexp{
compile("WARNING: /etc/ssh/moduli does not exist, using fixed modulus"), // printed by sshd
diff --git a/pkg/report/linux_test.go b/pkg/report/linux_test.go
index 2ad7bba2e..0c9bc3cdf 100644
--- a/pkg/report/linux_test.go
+++ b/pkg/report/linux_test.go
@@ -1665,6 +1665,49 @@ r0 = ioctl$KVM_CREATE_VM(0xffffffffffffffff, 0xae01, 0x0)
`, `BUG: bad unlock balance in ipmr_mfc_seq_stop`, false,
}, {
`
+[ 163.443279] =====================================
+[ 163.448095] WARNING: bad unlock balance detected!
+[ 163.452916] 4.15.0-rc3+ #217 Not tainted
+[ 163.456956] -------------------------------------
+[ 163.461783] syz-executor3/19522 is trying to release lock (mrt_lock) at:
+[ 163.468622] [<00000000adc671f1>] ipmr_mfc_seq_stop+0xe1/0x130
+[ 163.474487] but there are no more locks to release!
+[ 163.479485]
+[ 163.479485] other info that might help us debug this:
+[ 163.486133] 2 locks held by syz-executor3/19522:
+[ 163.490861] #0: (&f->f_pos_lock){+.+.}, at: [<00000000cd36f0f9>] __fdget_pos+0x131/0x1a0
+[ 163.499256] #1: (&p->lock){+.+.}, at: [<00000000c93d2595>] seq_lseek+0x58/0x3c0
+[ 163.506866]
+[ 163.506866] stack backtrace:
+[ 163.511343] CPU: 0 PID: 19522 Comm: syz-executor3 Not tainted 4.15.0-rc3+ #217
+[ 163.518677] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
+[ 163.528007] Call Trace:
+[ 163.530573] dump_stack+0x194/0x257
+[ 163.534176] ? arch_local_irq_restore+0x53/0x53
+[ 163.538823] ? ipmr_mfc_seq_stop+0xe1/0x130
+[ 163.543121] print_unlock_imbalance_bug+0x12f/0x140
+[ 163.548118] lock_release+0x5f9/0xda0
+[ 163.551899] ? ipmr_mfc_seq_stop+0xe1/0x130
+[ 163.556206] ? lock_downgrade+0x980/0x980
+[ 163.560332] ? iterate_fd+0x3f0/0x3f0
+[ 163.564105] ? lock_release+0xda0/0xda0
+[ 163.568060] ? do_raw_spin_trylock+0x190/0x190
+[ 163.572617] ? memcpy+0x45/0x50
+[ 163.575872] ? seq_puts+0xb5/0x130
+[ 163.579392] _raw_read_unlock+0x1a/0x30
+[ 163.583341] ipmr_mfc_seq_stop+0xe1/0x130
+[ 163.587462] traverse+0x3bc/0xa00
+[ 163.590894] ? seq_hlist_next+0xc0/0xc0
+[ 163.594846] seq_lseek+0x136/0x3c0
+[ 163.598361] ? traverse+0xa00/0xa00
+[ 163.601961] proc_reg_llseek+0xf1/0x160
+[ 163.605913] ? trace_hardirqs_on_caller+0x421/0x5c0
+[ 163.610902] ? proc_reg_read+0x170/0x170
+[ 163.614944] SyS_lseek+0xf1/0x170
+[ 163.618373] entry_SYSCALL_64_fastpath+0x1f/0x96
+`, `WARNING: bad unlock balance in ipmr_mfc_seq_stop`, false,
+ }, {
+ `
syzkaller login: [ 16.305150] INFO: trying to register non-static key.
[ 16.305671] the code is fine but needs lockdep annotation.
[ 16.306408] turning off the locking correctness validator.