This is a note to let you know that I've just added the patch titled

    xfs: only trace buffer items if they exist

to the 3.19-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xfs-only-trace-buffer-items-if-they-exist.patch
and it can be found in the queue-3.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From e9892d3cc853afdda2cc69e2576d9ddb5fafad71 Mon Sep 17 00:00:00 2001
From: Dave Chinner <[email protected]>
Date: Tue, 10 Feb 2015 09:23:40 +1100
Subject: xfs: only trace buffer items if they exist

From: Dave Chinner <[email protected]>

commit e9892d3cc853afdda2cc69e2576d9ddb5fafad71 upstream.

The commit 2d3d0c5 ("xfs: lobotomise xfs_trans_read_buf_map()") left
a landmine in the tracing code: trace_xfs_trans_buf_read() is now
call on all buffers that are read through this interface rather than
just buffers in transactions. For buffers outside transaction
context, bp->b_fspriv is null, and so the buf log item tracing
functions cannot be called. This causes a NULL pointer dereference
in the trace_xfs_trans_buf_read() function when tracing is turned
on.

Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/xfs/xfs_trans_buf.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/fs/xfs/xfs_trans_buf.c
+++ b/fs/xfs/xfs_trans_buf.c
@@ -327,9 +327,10 @@ xfs_trans_read_buf_map(
                return -EIO;
        }
 
-       if (tp)
+       if (tp) {
                _xfs_trans_bjoin(tp, bp, 1);
-       trace_xfs_trans_read_buf(bp->b_fspriv);
+               trace_xfs_trans_read_buf(bp->b_fspriv);
+       }
        *bpp = bp;
        return 0;
 


Patches currently in stable-queue which might be from [email protected] are

queue-3.19/xfs-set-buf-types-when-converting-extent-formats.patch
queue-3.19/xfs-only-trace-buffer-items-if-they-exist.patch
queue-3.19/xfs-inode-unlink-does-not-set-agi-buffer-type.patch
queue-3.19/xfs-ensure-buffer-types-are-set-correctly.patch
queue-3.19/xfs-set-superblock-buffer-type-correctly.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to