lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070923231713.f81ee0db.akpm@linux-foundation.org>
Date:	Sun, 23 Sep 2007 23:17:13 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Dave Hansen <haveblue@...ibm.com>
Cc:	linux-kernel@...r.kernel.org, hch@...radead.org
Subject: Re: [PATCH 24/25] r/o bind mounts: track number of mount writers

On Thu, 20 Sep 2007 12:53:20 -0700 Dave Hansen <haveblue@...ibm.com> wrote:

> This is the real meat of the entire series.  It actually
> implements the tracking of the number of writers to a mount.
> However, it causes scalability problems because there can
> be hundreds of cpus doing open()/close() on files on the
> same mnt at the same time.  Even an atomic_t in the mnt
> has massive scalaing problems because the cacheline gets
> so terribly contended.
> 
> This uses a statically-allocated percpu variable.  All
> operations are local to a cpu as long that cpu operates on
> the same mount, and there are no writer count imbalances.
> Writer count imbalances happen when a write is taken on one
> cpu, and released on another, like when an open/close pair
> is performed on two different cpus because the task moved.


Did you test with lockdep enabled?

=============================================
[ INFO: possible recursive locking detected ]
2.6.23-rc7-mm1 #1
---------------------------------------------
swapper/1 is trying to acquire lock:
 (&writer->lock){--..}, at: [<c0197a32>] lock_and_coalesce_cpu_mnt_writer_counts+0x32/0x70

but task is already holding lock:
 (&writer->lock){--..}, at: [<c0197a32>] lock_and_coalesce_cpu_mnt_writer_counts+0x32/0x70

other info that might help us debug this:
1 lock held by swapper/1:
 #0:  (&writer->lock){--..}, at: [<c0197a32>] lock_and_coalesce_cpu_mnt_writer_counts+0x32/0x70

stack backtrace:
 [<c0103ffa>] show_trace_log_lvl+0x1a/0x30
 [<c0104b82>] show_trace+0x12/0x20
 [<c0104c96>] dump_stack+0x16/0x20
 [<c0144dc5>] __lock_acquire+0xde5/0x10a0
 [<c01450fa>] lock_acquire+0x7a/0xa0
 [<c03e734c>] _spin_lock+0x2c/0x40
 [<c0197a32>] lock_and_coalesce_cpu_mnt_writer_counts+0x32/0x70
 [<c01982c6>] mntput_no_expire+0x36/0xc0
 [<c0188f15>] path_release_on_umount+0x15/0x20
 [<c0198930>] sys_umount+0x40/0x230
 [<c010070b>] name_to_dev_t+0x9b/0x270
 [<c05230c2>] prepare_namespace+0x62/0x1b0
 [<c05226ca>] kernel_init+0x21a/0x320
 [<c0103b47>] kernel_thread_helper+0x7/0x10
 =======================

It look like a false positive to me, but really, for a patchset of this
complexity and maturity I cannot fathom how it could have escaped any
lockdep testing.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ