* [PATCH 4.4.y/4.9.y] NFS: fix highmem leak exist in nfs_readdir_xdr_to_array
@ 2020-03-10 10:02 yangerkun
2020-03-10 11:37 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: yangerkun @ 2020-03-10 10:02 UTC (permalink / raw)
To: sashal, gregkh; +Cc: stable
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 4.4.y/4.9.y] NFS: fix highmem leak exist in nfs_readdir_xdr_to_array
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
2020-03-10 12:27 ` yangerkun
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2020-03-10 11:37 UTC (permalink / raw)
To: yangerkun; +Cc: sashal, stable
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 4.4.y/4.9.y] NFS: fix highmem leak exist in nfs_readdir_xdr_to_array
2020-03-10 11:37 ` Greg KH
@ 2020-03-10 12:27 ` yangerkun
0 siblings, 0 replies; 4+ messages in thread
From: yangerkun @ 2020-03-10 12:27 UTC (permalink / raw)
To: Greg KH; +Cc: sashal, stable
On 2020/3/10 19:37, Greg KH wrote:
> 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.
Okay, will do it right now.
Thanks,
Kun.
>
> thanks,
>
> greg k-h
>
>
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 4.4.y/4.9.y] NFS: fix highmem leak exist in nfs_readdir_xdr_to_array
@ 2020-03-10 13:00 yangerkun
0 siblings, 0 replies; 4+ messages in thread
From: yangerkun @ 2020-03-10 13:00 UTC (permalink / raw)
To: sashal, gregkh
Cc: trond.myklebust, anna.schumaker, linux-nfs, stable, yangerkun
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-10 12:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-03-10 12:27 ` yangerkun
2020-03-10 13:00 yangerkun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.