diff options
| author | Dai Ngo <dai.ngo@oracle.com> | 2026-05-19 17:32:58 -0700 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-05-30 08:26:17 +0200 |
| commit | 97bdbf2613eb89428b739ce09d1a6e1c8435a286 (patch) | |
| tree | e5a5627dd41e98a4eed0c24dc70a9fa080fb6992 /scripts/stackusage | |
| parent | bc95fa240a1b8ae64d3dabe87cbe103b912afc45 (diff) | |
xfs: fix use of uninitialized imap in xfs_fs_map_blocks error path
xfs_fs_map_blocks() acquires the data map lock and then calls
xfs_bmapi_read(). If xfs_bmapi_read() fails, the function currently
still falls through to xfs_bmbt_to_iomap(), which consumes an
uninitialized imap record and may return invalid data to the caller.
Fix this by releasing the data map lock and returning immediately when
xfs_bmapi_read() reports an error. This prevents xfs_bmbt_to_iomap()
from being called with an uninitialized xfs_bmbt_irec.
Fixes: 527851124d10f ("xfs: implement pNFS export operations")
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
