All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] NFS: Fix a number of memory leaks and use-after-free
@ 2020-04-01 18:56 trondmy
  2020-04-01 18:56 ` [PATCH 01/10] NFS: Fix a page leak in nfs_destroy_unlinked_subrequests() trondmy
  0 siblings, 1 reply; 13+ messages in thread
From: trondmy @ 2020-04-01 18:56 UTC (permalink / raw)
  To: linux-nfs

From: Trond Myklebust <trond.myklebust@hammerspace.com>

When running xfstests with wsize=1024, a number of use-after-free issues
and memory leaks can currently be hit. One of the more obvious
leaks is seen when the generic/013 test fails due to the presence of
sillyrenamed files that never go away.

After testing with kasan enabled, and adding some debugging code to
detect leaked nfs_page and nfs_direct_req structures, I found a number
of issues that appear to be fixed by the following patchset.

Trond Myklebust (10):
  NFS: Fix a page leak in nfs_destroy_unlinked_subrequests()
  NFS: Fix races nfs_page_group_destroy() vs
    nfs_destroy_unlinked_subrequests()
  NFS: Fix use-after-free issues in nfs_pageio_add_request()
  NFS: Fix a request reference leak in nfs_direct_write_clear_reqs()
  NFS: Fix memory leaks in nfs_pageio_stop_mirroring()
  NFS: Remove the redundant function nfs_pgio_has_mirroring()
  NFS: Clean up nfs_lock_and_join_requests()
  NFS: Reverse the submission order of requests in
    __nfs_pageio_add_request()
  NFS: Refactor nfs_lock_and_join_requests()
  NFS: Try to join page groups before an O_DIRECT retransmission

 fs/nfs/direct.c          |  21 +++
 fs/nfs/internal.h        |   6 -
 fs/nfs/pagelist.c        | 350 +++++++++++++++++++++++++--------------
 fs/nfs/write.c           | 258 ++++++++++++++---------------
 include/linux/nfs_page.h |   5 +
 5 files changed, 379 insertions(+), 261 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-04-02 16:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01 18:56 [PATCH 00/10] NFS: Fix a number of memory leaks and use-after-free trondmy
2020-04-01 18:56 ` [PATCH 01/10] NFS: Fix a page leak in nfs_destroy_unlinked_subrequests() trondmy
2020-04-01 18:56   ` [PATCH 02/10] NFS: Fix races nfs_page_group_destroy() vs nfs_destroy_unlinked_subrequests() trondmy
2020-04-01 18:56     ` [PATCH 03/10] NFS: Fix use-after-free issues in nfs_pageio_add_request() trondmy
2020-04-01 18:56       ` [PATCH 04/10] NFS: Fix a request reference leak in nfs_direct_write_clear_reqs() trondmy
2020-04-01 18:56         ` [PATCH 05/10] NFS: Fix memory leaks in nfs_pageio_stop_mirroring() trondmy
2020-04-01 18:56           ` [PATCH 06/10] NFS: Remove the redundant function nfs_pgio_has_mirroring() trondmy
2020-04-01 18:56             ` [PATCH 07/10] NFS: Clean up nfs_lock_and_join_requests() trondmy
2020-04-01 18:56               ` [PATCH 08/10] NFS: Reverse the submission order of requests in __nfs_pageio_add_request() trondmy
2020-04-01 18:56                 ` [PATCH 09/10] NFS: Refactor nfs_lock_and_join_requests() trondmy
2020-04-01 18:56                   ` [PATCH 10/10] NFS: Try to join page groups before an O_DIRECT retransmission trondmy
2020-04-02 16:14           ` [PATCH 05/10] NFS: Fix memory leaks in nfs_pageio_stop_mirroring() Anna Schumaker
2020-04-02 16:54             ` Trond Myklebust

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.