projects/linux·commit 81ac2565

Merge tag 'nfsd-6.1-5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

81ac2565 · Linus Torvalds <[email protected]> · 2022-11-17 09:04:50 -08:00

Pull nfsd fix from Chuck Lever:

 - Fix another tracepoint crash

* tag 'nfsd-6.1-5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
  NFSD: Fix trace_nfsd_fh_verify_err() crasher
Commit
81ac25651a62c958bb0e074e0d4e25060ea557dd
Parents
847ccab8 · 5a01c805

Merge commit. Changes below are compared with the first parent: 847ccab8.

Changes

1 files changed · +4 −1

FileStatusAddDelContent
fs/nfsd/trace.hmodified+4−1View file

fs/nfsd/trace.h

View file
diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h
index 06a96e9..d4b6839 100644
--- a/fs/nfsd/trace.h
+++ b/fs/nfsd/trace.h
@@ -254,7 +254,10 @@ TRACE_EVENT_CONDITION(nfsd_fh_verify_err,
rqstp->rq_xprt->xpt_remotelen);
__entry->xid = be32_to_cpu(rqstp->rq_xid);
__entry->fh_hash = knfsd_fh_hash(&fhp->fh_handle);
- __entry->inode = d_inode(fhp->fh_dentry);
+ if (fhp->fh_dentry)
+ __entry->inode = d_inode(fhp->fh_dentry);
+ else
+ __entry->inode = NULL;
__entry->type = type;
__entry->access = access;
__entry->error = be32_to_cpu(error);