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]
Date:	Mon, 23 Nov 2009 14:33:15 +0200
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	Joern Engel <joern@...fs.org>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-mtd@...ts.infradead.org, Arnd Bergmann <arnd@...db.de>,
	Hugh Dickins <hugh.dickins@...cali.co.uk>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 12/17] [LogFS] readwrite.c

Hi Joern,

(Dunno who to CC, really, so lets see if I can trick Andrew or Hugh
into looking at the issue.)

On Fri, Nov 20, 2009 at 9:38 PM, Joern Engel <joern@...fs.org> wrote:
> +static void logfs_lock_write_page(struct page *page)
> +{
> +       int loop = 0;
> +
> +       while (unlikely(!trylock_page(page))) {
> +               if (loop++ > 0x1000) {
> +                       /* Has been observed once so far... */
> +                       printk(KERN_ERR "stack at %p\n", &loop);
> +                       BUG();
> +               }
> +               if (PagePreLocked(page)) {
> +                       /* Holder of page lock is waiting for us, it
> +                        * is safe to use this page. */
> +                       break;
> +               }
> +               /* Some other process has this page locked and has
> +                * nothing to do with us.  Wait for it to finish.
> +                */
> +               schedule();
> +       }
> +       BUG_ON(!PageLocked(page));
> +}

What's the purpose of PagePreLocked()? The above function looks pretty
fragile for a filesystem to me.

                        Pekka
--
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