Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. From 39d0d3bdf7bab3021a31e501172ac0f18947f9b3 Mon Sep 17 00:00:00 2001
  2. From: Anna Schumaker <Anna.Schumaker@netapp.com>
  3. Date: Mon, 5 Oct 2015 16:43:26 -0400
  4. Subject: [PATCH] NFS: Fix a tracepoint NULL-pointer dereference
  5.  
  6. Running xfstest generic/013 with the tracepoint nfs:nfs4_open_file
  7. enabled produces a NULL-pointer dereference when calculating fileid and
  8. filehandle of the opened file. Fix this by checking if state is NULL
  9. before trying to use the inode pointer.
  10.  
  11. Reported-by: Olga Kornievskaia <aglo@umich.edu>
  12. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  13. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  14. ---
  15. fs/nfs/nfs4trace.h | 2 +-
  16. 1 file changed, 1 insertion(+), 1 deletion(-)
  17.  
  18. diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
  19. index 28df12e..671cf68 100644
  20. --- a/fs/nfs/nfs4trace.h
  21. +++ b/fs/nfs/nfs4trace.h
  22. @@ -409,7 +409,7 @@ DECLARE_EVENT_CLASS(nfs4_open_event,
  23. __entry->flags = flags;
  24. __entry->fmode = (__force unsigned int)ctx->mode;
  25. __entry->dev = ctx->dentry->d_sb->s_dev;
  26. - if (!IS_ERR(state))
  27. + if (!IS_ERR_OR_NULL(state))
  28. inode = state->inode;
  29. if (inode != NULL) {
  30. __entry->fileid = NFS_FILEID(inode);
  31.  
  32. https://github.com/torvalds/linux/commits?author=Anna.Schumaker@netapp.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement