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] [day] [month] [year] [list]
Date:   Fri, 6 Oct 2023 14:32:16 -0700
From:   Suren Baghdasaryan <surenb@...gle.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     "Liam R. Howlett" <Liam.Howlett@...cle.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Jann Horn <jannh@...gle.com>,
        Lorenzo Stoakes <lstoakes@...il.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Matthew Wilcox <willy@...radead.org>, stable@...r.kernel.org
Subject: Re: [PATCH v3 2/3] mmap: Fix error paths with dup_anon_vma()

On Fri, Oct 6, 2023 at 2:08 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Tue, 3 Oct 2023 09:21:22 -0700 Suren Baghdasaryan <surenb@...gle.com> wrote:
>
> > > @@ -633,7 +641,7 @@ int vma_expand(struct vma_iterator *vmi, struct vm_area_struct *vma,
> > >
> > >                 remove_next = true;
> > >                 vma_start_write(next);
> > > -               ret = dup_anon_vma(vma, next);
> > > +               ret = dup_anon_vma(vma, next, &anon_dup);
> > >                 if (ret)
> > >                         return ret;
> >
> > Shouldn't the above be changed to a "goto nomem" instead of "return ret" ?
>
> It looks OK to me as-is - dup_anon_vma() leaves anon_dup==NULL
> when it returns error.

Yes, I realised that after sending the question and didn't want to
create more noise than I already did... All seems good.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ