Re: [3.6-rc1] fs: bad unlock balance warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

Bisection with an error injection

--- a/security/security.c
+++ b/security/security.c
@@ -747,6 +747,10 @@ int security_file_open(struct file *file, const struct cred *cred)
 {
        int ret;

+       if (ACC_MODE(file->f_flags) == FMODE_WRITE &&
+           current->pid == 1)
+               return -EPERM;
+
        ret = security_ops->file_open(file, cred);
        if (ret)
                return ret;

reported that commit eb04c282
"fs: Add freezing handling to mnt_want_write() / mnt_drop_write()"
is causing this warning.

Would you check?

[    4.218475] =====================================
[    4.218865] [ BUG: bad unlock balance detected! ]
[    4.219950] 3.5.0-rc6-00363-geb04c28-dirty #34 Not tainted
[    4.220392] -------------------------------------
[    4.220742] swapper/0/1 is trying to release lock (sb_writers) at:
[    4.221770] [<c10f740f>] mnt_drop_write+0x2f/0x40
[    4.221913] but there are no more locks to release!
[    4.221913]
[    4.221913] other info that might help us debug this:
[    4.221913] no locks held by swapper/0/1.
[    4.221913]
[    4.221913] stack backtrace:
[    4.221913] Pid: 1, comm: swapper/0 Not tainted 3.5.0-rc6-00363-geb04c28-dirty #34
[    4.221913] Call Trace:
[    4.221913]  [<c10f740f>] ? mnt_drop_write+0x2f/0x40
[    4.221913]  [<c10758f2>] print_unlock_inbalance_bug+0xe2/0xf0
[    4.221913]  [<c10f740f>] ? mnt_drop_write+0x2f/0x40
[    4.221913]  [<c10f740f>] ? mnt_drop_write+0x2f/0x40
[    4.221913]  [<c1078bb4>] lock_release+0x154/0x1d0
[    4.221913]  [<c10f740f>] ? mnt_drop_write+0x2f/0x40
[    4.221913]  [<c10dc575>] __sb_end_write+0x75/0x80
[    4.221913]  [<c10f740f>] mnt_drop_write+0x2f/0x40
[    4.221913]  [<c10e6d2e>] do_last+0x1de/0xb70
[    4.221913]  [<c10e5121>] ? inode_permission+0x11/0x50
[    4.221913]  [<c10e7728>] ? link_path_walk+0x68/0x770
[    4.221913]  [<c10e98f8>] path_openat+0x98/0x3a0
[    4.221913]  [<c107379b>] ? trace_hardirqs_off+0xb/0x10
[    4.221913]  [<c10e9ce0>] do_filp_open+0x30/0x80
[    4.221913]  [<c10f60fa>] ? alloc_fd+0x14a/0x1e0
[    4.221913]  [<c10d93ad>] do_sys_open+0xed/0x1c0
[    4.221913]  [<c159f4ef>] ? do_header+0x9f/0x264
[    4.221913]  [<c10d94ed>] sys_open+0x2d/0x40
[    4.221913]  [<c159f21f>] do_name+0xba/0x27d
[    4.221913]  [<c159ee53>] flush_buffer+0x75/0x9a
[    4.221913]  [<c15b8216>] gunzip+0x225/0x2bb
[    4.221913]  [<c15b7fe9>] ? cfq_init+0x89/0x89
[    4.221913]  [<c15b7ff1>] ? nofill+0x8/0x8
[    4.221913]  [<c159f813>] unpack_to_rootfs+0x15f/0x275
[    4.221913]  [<c159edde>] ? do_reset+0xb0/0xb0
[    4.221913]  [<c159ec07>] ? initrd_load+0x352/0x352
[    4.221913]  [<c159fa03>] populate_rootfs+0x50/0x23d
[    4.221913]  [<c13de402>] ? printk+0x38/0x3a
[    4.221913]  [<c15ba0c6>] ? pci_apply_final_quirks+0xe8/0x106
[    4.221913]  [<c100110f>] do_one_initcall+0x2f/0x170
[    4.221913]  [<c159f9b3>] ? free_initrd+0x8a/0x8a
[    4.221913]  [<c159d53c>] kernel_init+0xec/0x18e
[    4.221913]  [<c159d3f5>] ? parse_early_options+0x35/0x35
[    4.221913]  [<c159d450>] ? repair_env_string+0x5b/0x5b
[    4.221913]  [<c13e2a7a>] kernel_thread_helper+0x6/0xd
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux