Skip to content

Commit

Permalink
pkg/report: add "lock held when returning to user space" format for o…
Browse files Browse the repository at this point in the history
…lder kernels
  • Loading branch information
dvyukov committed Jul 13, 2018
1 parent 06c33b3 commit 3d74117
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/report/linux.go
Expand Up @@ -693,6 +693,12 @@ var linuxOopses = []*oops{
report: compile("BUG: .*still has locks held!(?:.*\\n)+?.*{{PC}} +{{FUNC}}"),
fmt: "BUG: still has locks held in %[1]v",
},
{
title: compile("BUG: lock held when returning to user space"),
report: compile("BUG: lock held when returning to user space(?:.*\\n)+?.*leaving the kernel with locks still held(?:.*\\n)+?.*at: (?:{{PC}} +)?{{FUNC}}"),
fmt: "BUG: lock held when returning to user space in %[1]v",
noStackTrace: true,
},
{
title: compile("BUG: bad unlock balance detected!"),
report: compile("BUG: bad unlock balance detected!(?:.*\\n){0,15}?.*is trying to release lock(?:.*\\n){0,15}?.*{{PC}} +{{FUNC}}"),
Expand Down Expand Up @@ -819,7 +825,6 @@ var linuxOopses = []*oops{
fmt: "WARNING: locking bug in %[1]v",
stack: warningStackFmt(),
},

{
title: compile("WARNING: lock held when returning to user space"),
report: compile("WARNING: lock held when returning to user space(?:.*\\n)+?.*leaving the kernel with locks still held(?:.*\\n)+?.*at: (?:{{PC}} +)?{{FUNC}}"),
Expand Down
10 changes: 10 additions & 0 deletions pkg/report/testdata/linux/report/258
@@ -0,0 +1,10 @@
TITLE: BUG: lock held when returning to user space in fuse_lock_inode

[ 36.715112] ================================================
[ 36.720935] [ BUG: lock held when returning to user space! ]
[ 36.726730] 4.9.112-g9e79039 #7 Not tainted
[ 36.731032] ------------------------------------------------
[ 36.736813] syz-executor724/3814 is leaving the kernel with locks still held!
[ 36.744085] 1 lock held by syz-executor724/3814:
[ 36.748826] #0: (&fi->mutex){+.+.+.}, at: [<ffffffff81938722>] fuse_lock_inode+0xa2/0xd0
[ 36.748826] #1: (&fi->mutex){+.+.+.}, at: [<ffffffff81938722>] somethingelse+0xa2/0xd0

0 comments on commit 3d74117

Please sign in to comment.