[lustre-devel] [PATCH 04/40] lustre: osc: page fault in osc_release_bounce_pages()
James Simmons <[email protected]>
| Newsgroups | org.lustre.lists.lustre-devel |
|---|---|
| Message-ID | <[email protected]> |
From: Andriy Skulysh <[email protected]> pga[i] can be uninitialized. It happens after following code path in osc_build_rpc(): oa = kmem_cache_zalloc(osc_obdo_kmem, GFP_NOFS); if (!oa) { rc = -ENOMEM; goto out; } Fixes: ef93d889b4c6 ("lustre: sec: encryption for write path") HPE-bug-id: LUS-10991 WC-bug-id: https://jira.whamcloud.com/browse/LU-16333 Signed-off-by: Andriy Skulysh <[email protected]> Reviewed-by: Alexander Zarochentsev <[email protected]> Reviewed-by: Alexander Boyko <[email protected]> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49210 Reviewed-by: Sebastien Buisson <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Reviewed-by: Alexander Boyko <[email protected]> Reviewed-by: Andreas Dilger <[email protected]> Signed-off-by: James Simmons <[email protected]> --- fs/lustre/osc/osc_request.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/lustre/osc/osc_request.c b/fs/lustre/osc/osc_request.c index bd294c5..6ea1db6 100644 --- a/fs/lustre/osc/osc_request.c +++ b/fs/lustre/osc/osc_request.c @@ -1463,6 +1463,9 @@ static inline void osc_release_bounce_pages(struct brw_page **pga, struct page **pa = NULL; int i, j = 0; + if (!pga[0]) + return; + if (PageChecked(pga[0]->pg)) { pa = kvmalloc_array(page_count, sizeof(*pa), GFP_KERNEL | __GFP_ZERO); -- 1.8.3.1 _______________________________________________ lustre-devel mailing list [email protected] http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org