2008-08-19 12:36:32

by Alexander Beregalov

[permalink] [raw]
Subject: Re: linux-next: Tree for August 19: CRED: BUG: bad unlock balance detected!

It is sparc64 machine.
Config is attached.

[ 25.742287] [ BUG: bad unlock balance detected! ]
[ 25.750284] -------------------------------------
[ 25.758404] rc/404 is trying to release lock (&p->cred_exec_mutex) at:
[ 25.766716] [<00000000006aff78>] mutex_unlock+0x10/0x20
[ 25.775078] but there are no more locks to release!
[ 25.783548]
[ 25.783554] other info that might help us debug this:
[ 25.800205] no locks held by rc/404.
[ 25.808508]
[ 25.808514] stack backtrace:
[ 25.824764] Call Trace:
[ 25.832652] [0000000000478014] print_unlock_inbalance_bug+0xe8/0xf8
[ 25.840661] [0000000000478340] lock_release+0x98/0x1ac
[ 25.848690] [00000000006afed4] __mutex_unlock_slowpath+0xbc/0x150
[ 25.856664] [00000000006aff78] mutex_unlock+0x10/0x20
[ 25.864780] [00000000004b8460] install_exec_creds+0x1c/0x2c
[ 25.872784] [00000000004f077c] load_elf_binary+0xc98/0x11e4
[ 25.880858] [00000000004b8314] search_binary_handler+0xcc/0x1fc
[ 25.888817] [00000000004e7a18] compat_do_execve+0x178/0x1e4
[ 25.896913] [0000000000441f08] sparc32_execve+0x70/0xbc
[ 25.904811] [0000000000406154] linux_sparc_syscall32+0x34/0x40


Attachments:
(No filename) (1.14 kB)
config-0819-cred.gz (6.45 kB)
Download all attachments

2008-08-19 15:23:45

by David Howells

[permalink] [raw]
Subject: Re: linux-next: Tree for August 19: CRED: BUG: bad unlock balance detected!


Alexander Beregalov <[email protected]> wrote:

> [ 25.742287] [ BUG: bad unlock balance detected! ]
> [ 25.750284] -------------------------------------
> [ 25.758404] rc/404 is trying to release lock (&p->cred_exec_mutex) at:
> [ 25.766716] [<00000000006aff78>] mutex_unlock+0x10/0x20
> [ 25.775078] but there are no more locks to release!

I forgot to lock cred_exec_mutex in compat_do_execve(). I've posted a patch
which should fix this:

Subject: [PATCH] CRED: Take cred_exec_mutex in compat_do_execve() and fix
error handling in do_execve()

David