gfs2: handle errors from __filemap_get_folio() with FGP_CREAT in gfs2_getbuf() and its caller chain
Get series with b4
b4 am [email protected] change-id 20260908-gfs2_getbuf-error-checks-e8f89a08acc4Versions newest first
- v1 Latest5 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | gfs2: handle errors from __filemap_get_folio() with FGP_CREAT in gfs2_getbuf()fs/ | +4 | 0 replies | |
| 2/5 | gfs2: handle NULL return value in callers of gfs2_getbuf() with CREATEfs/ fs/ fs/ | +23 | 0 replies | |
| 3/5 | gfs2: handle NULL return value in callers of gfs2_meta_new()fs/ fs/ fs/ +2 more | +48 | 0 replies | |
| 4/5 | gfs2: handle NULL return value in callers of gfs2_meta_ra()fs/ fs/ | +6 | 0 replies | |
| 5/5 | gfs2: check for errors from filemap_get_folio() in gfs2_jhead_process_page()fs/ | +18 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] gfs2: handle errors from __filemap_get_folio() with FGP_CREAT in gfs2_getbuf() and its caller chain
Currently, gfs2_getbuf() will hit a kernel oops for dereferencing an error pointer if __filemap_get_folio() with FGP_CREAT fails, eg ERR_PTR(-ENOMEM), as there is no error handling in this case.
The code and documentation in filemap.c and pagemap.h show that it indeed may fail, and other callers in the kernel check for errors with FGP_CREAT.
This series adds such error handling in gfs2_getbuf() and its caller chain.
Tested with fstests on v7.3-rc1. It "Failed 51 out 788 tests" consistently, plus one (different) flaky test on ~10 runs before and after this series.
Thanks,
---
Mauricio Faria de Oliveira (5):
gfs2: handle errors from __filemap_get_folio() with FGP_CREAT in gfs2_getbuf()
gfs2: handle NULL return value in callers of gfs2_getbuf() with CREATE
gfs2: handle NULL return value in callers of gfs2_meta_new()
gfs2: handle NULL return value in callers of gfs2_meta_ra()
gfs2: check for errors from filemap_get_folio() in gfs2_jhead_process_page()
fs/gfs2/bmap.c | 27 +++++++++++++++++++-------- fs/gfs2/dir.c | 8 ++++++++ fs/gfs2/inode.c | 20 +++++++++++++++----- fs/gfs2/lops.c | 31 ++++++++++++++++++++++++++----- fs/gfs2/meta_io.c | 30 +++++++++++++++++++++++------- fs/gfs2/recovery.c | 2 ++ fs/gfs2/xattr.c | 6 ++++++ 7 files changed, 99 insertions(+), 25 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260908-gfs2_getbuf-error-checks-e8f89a08acc4
Best regards,
Signature · 1 line
Mauricio Faria de Oliveira <[email protected]>