[PATCH v16 09/12] namei: LOOKUP_{IN_ROOT,BENEATH}: permit limited ".." resolution
Aleksa Sarai
asarai at suse.de
Sun Nov 17 03:38:46 AEDT 2019
On 2019-11-16, Al Viro <viro at zeniv.linux.org.uk> wrote:
> On Sat, Nov 16, 2019 at 11:27:59AM +1100, Aleksa Sarai wrote:
>
> > + if (unlikely(nd->flags & LOOKUP_IS_SCOPED)) {
> > + bool m_retry = read_seqretry(&mount_lock, nd->m_seq);
> > + bool r_retry = read_seqretry(&rename_lock, nd->r_seq);
> > +
> > + /*
> > + * If there was a racing rename or mount along our
> > + * path, then we can't be sure that ".." hasn't jumped
> > + * above nd->root (and so userspace should retry or use
> > + * some fallback).
> > + */
> > + if (unlikely(m_retry || r_retry))
> > + return -EAGAIN;
> > + }
> > }
> > return 0;
>
> Elaborate... Do these boolean variables make any sense now, really?
You're quite right, they don't make sense any more. I'll drop them.
--
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20191117/508cbb6b/attachment.sig>
More information about the Linuxppc-dev
mailing list