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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 26 May 2020 10:43:52 +0530 From: Souptick Joarder <jrdr.linux@...il.com> To: Dan Carpenter <dan.carpenter@...cle.com> Cc: Dan Williams <dan.j.williams@...el.com>, Andrew Morton <akpm@...ux-foundation.org>, Jason Gunthorpe <jgg@...pe.ca>, dsterba@...e.com, Arnd Bergmann <arnd@...db.de>, Ira Weiny <ira.weiny@...el.com>, linux-kernel@...r.kernel.org Subject: Re: [PATCH] drivers/virt/fsl_hypervisor: Correcting error handling path On Fri, May 22, 2020 at 6:24 PM Dan Carpenter <dan.carpenter@...cle.com> wrote: > > On Thu, May 14, 2020 at 01:53:16AM +0530, Souptick Joarder wrote: > > First, when memory allocation for sg_list_unaligned failed, there > > is no point of calling put_pages() as we haven't pinned any pages. > > > > Second, if get_user_pages_fast() failed we should unpinned num_pinned > > pages, no point of checking till num_pages. > > > > This will address both. > > > > Signed-off-by: Souptick Joarder <jrdr.linux@...il.com> > > If gup_flags were | FOLL_LONGTERM then this patch would fix a double > free because of the put_page() in __gup_longterm_locked(). > > mm/gup.c > 1786 if (check_dax_vmas(vmas_tmp, rc)) { > 1787 for (i = 0; i < rc; i++) > 1788 put_page(pages[i]); > ^^^^^^^^^^^^^^^^^^^ > put_page() here and also in the caller. > > 1789 rc = -EOPNOTSUPP; > 1790 goto out; > 1791 } > > But since this isn't FOLL_LONGTERM the patch is a nice cleanup which > doesn't affect run time. > > Reviewed-by: Dan Carpenter <dan.carpenter@...cle.com> Hi Andrew, Is it fine to take it through mm tree ?
Powered by blists - more mailing lists