]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: fix pagefault due to unhandled NULL check in da_read_buf()
authorAjeet Yadav <ajeet.yadav.77@gmail.com>
Tue, 1 Feb 2011 21:28:40 +0000 (14:28 -0700)
committerChristoph Hellwig <hch@tuxera.com>
Tue, 1 Feb 2011 21:28:40 +0000 (14:28 -0700)
commit663acd56b4405e8ea348c5a62c2b5573d8da69e6
tree20975f7f88133dc3292c29e9225481cedf655f98
parent1f07076baa15e5751617908075a0938a7dad69e5
xfs_repair: fix pagefault due to unhandled NULL check in da_read_buf()

xfs_repair does not correctly handle bplist[i] for error situations in
function da_read_buf(). If libxfs_readbuf() fails then bplist[i] = NULL,
but error handing code calls libxfs_putbuf(bdlist[i]) for all indexes of i
without first checking whether its NULL. This result in pagefault in
libpthread library during pthread_mutex_unlock().
This problem is identified when we remove the storage while xfs_repair
is running on it.

Signed-off-by: Ajeet Yadav <ajeet.yadav.77@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
repair/dir2.c