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:	Fri, 19 Nov 2010 11:42:21 -0800
From:	Tim Pepper <lnxninja@...ux.vnet.ibm.com>
To:	Nick Piggin <npiggin@...nel.dk>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 16/28] fs: Use rename lock and RCU for multi-step operations

On Tue, Nov 16, 2010 at 6:09 AM, Nick Piggin <npiggin@...nel.dk> wrote:

> +               /* might go back up the wrong parent if we have had a rename
> +                * or deletion */
> +               if (this_parent != child->d_parent ||
> +                               read_seqretry(&rename_lock, seq)) {
> +                       spin_unlock(&this_parent->d_lock);
> +                       spin_unlock(&dcache_lock);
> +                       rcu_read_unlock();
> +                       goto rename_retry;
> +               }
> +               rcu_read_unlock();
> +               next = child->d_u.d_child.next;

Again there are something like three insertions of this check.  Right
now it arguably makes sense to have everything explicitly clear inline
at every instance of the code for review, but eventually it might be
more readable if these became something like:

if (rename_happened(...))
        goto rename_retry;

(accounting for the change in patch 19 of course)
--
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