Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: yangerkun <yangerkun@huawei.com>
Cc: sashal@kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 4.4.y/4.9.y] NFS: fix highmem leak exist in nfs_readdir_xdr_to_array
Date: Tue, 10 Mar 2020 12:37:53 +0100	[thread overview]
Message-ID: <20200310113753.GA3106483@kroah.com> (raw)
In-Reply-To: <20200310100219.5421-1-yangerkun@huawei.com>

On Tue, Mar 10, 2020 at 06:02:19PM +0800, yangerkun wrote:
> The patch 'e22dea67d2f7 ("NFS: Fix memory leaks and corruption in
> readdir")' in 4.4.y/4.9.y will introduce a highmem leak.
> Actually, nfs_readdir_get_array has did what we want to do. No need to
> call kmap again.
> 
> Signed-off-by: yangerkun <yangerkun@huawei.com>
> ---
>  fs/nfs/dir.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
> index c2665d920cf8..2517fcd423b6 100644
> --- a/fs/nfs/dir.c
> +++ b/fs/nfs/dir.c
> @@ -678,8 +678,6 @@ int nfs_readdir_xdr_to_array(nfs_readdir_descriptor_t *desc, struct page *page,
>  		goto out_label_free;
>  	}
>  
> -	array = kmap(page);
> -
>  	status = nfs_readdir_alloc_pages(pages, array_size);
>  	if (status < 0)
>  		goto out_release_array;
> -- 
> 2.17.2
> 

Can you resend and cc: the NFS developers and maintainers on this
change?  I need their ack to be able to apply it.

thanks,

greg k-h


  reply	other threads:[~2020-03-10 11:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 10:02 [PATCH 4.4.y/4.9.y] NFS: fix highmem leak exist in nfs_readdir_xdr_to_array yangerkun
2020-03-10 11:37 ` Greg KH [this message]
2020-03-10 12:27   ` yangerkun
  -- strict thread matches above, loose matches on Subject: below --
2020-03-10 13:00 yangerkun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200310113753.GA3106483@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yangerkun@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox