summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2015-03-25 14:54:25 +1100
committerDave Chinner <david@fromorbit.com>2015-03-25 14:54:25 +1100
commitb26384dc52edba2f5fcc2b38eccc98e1f44bb379 (patch)
treeb2a82b58703fa68c9ab9a3175fa86006b0bb3efc /fs/xfs
parentd64588ca28bcd58f100f7933d0c18c8b504162bb (diff)
downloadlinux-b26384dc52edba2f5fcc2b38eccc98e1f44bb379.tar.bz2
xfs: fix NULL pointer dereference in xfs_filestream_lookup_ag()
If xfs_filestream_get_parent() fails, we have a null pip, goto out, and attempt to IRELE(NULL). This causes a null pointer dereference and BUG(). Fix this by directly returning NULLAGNUMBER in this case. Reported-by: Adrien Nader <adrien@notk.org> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_filestream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_filestream.c b/fs/xfs/xfs_filestream.c
index a2e86e8a0fea..8f9f854376c6 100644
--- a/fs/xfs/xfs_filestream.c
+++ b/fs/xfs/xfs_filestream.c
@@ -322,7 +322,7 @@ xfs_filestream_lookup_ag(
pip = xfs_filestream_get_parent(ip);
if (!pip)
- goto out;
+ return NULLAGNUMBER;
mru = xfs_mru_cache_lookup(mp->m_filestream, pip->i_ino);
if (mru) {