mbox series

[RFC,0/6] Fix nits found by static analysis

Message ID 20241017150349.216096-8-cel@kernel.org (mailing list archive)
Headers show
Series Fix nits found by static analysis | expand

Message

Chuck Lever Oct. 17, 2024, 3:03 p.m. UTC
From: Chuck Lever <chuck.lever@oracle.com>

Here are a handful of fixes for issues found by static analysis.
These are the ones I understood enough to address immediately. There
are others that will take some time to analyze and address.

Chuck Lever (6):
  NFSD: Remove dead code in nfsd4_create_session()
  NFSD: Remove a never-true comparison
  NFSD: Prevent NULL dereference in nfsd4_process_cb_update()
  NFSD: Remove unused results in nfsd4_encode_pathname4()
  NFSD: Remove unused values from nfsd4_encode_components_esc()
  NFSD: Cap the number of bytes copied by nfs4_reset_recoverydir()

 fs/nfsd/nfs4callback.c |  2 ++
 fs/nfsd/nfs4recover.c  |  3 ++-
 fs/nfsd/nfs4state.c    |  3 ---
 fs/nfsd/nfs4xdr.c      | 23 +++++++----------------
 fs/nfsd/nfsfh.c        |  2 +-
 5 files changed, 12 insertions(+), 21 deletions(-)

Comments

Jeff Layton Oct. 17, 2024, 3:16 p.m. UTC | #1
On Thu, 2024-10-17 at 11:03 -0400, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> Here are a handful of fixes for issues found by static analysis.
> These are the ones I understood enough to address immediately. There
> are others that will take some time to analyze and address.
> 
> Chuck Lever (6):
>   NFSD: Remove dead code in nfsd4_create_session()
>   NFSD: Remove a never-true comparison
>   NFSD: Prevent NULL dereference in nfsd4_process_cb_update()
>   NFSD: Remove unused results in nfsd4_encode_pathname4()
>   NFSD: Remove unused values from nfsd4_encode_components_esc()
>   NFSD: Cap the number of bytes copied by nfs4_reset_recoverydir()
> 
>  fs/nfsd/nfs4callback.c |  2 ++
>  fs/nfsd/nfs4recover.c  |  3 ++-
>  fs/nfsd/nfs4state.c    |  3 ---
>  fs/nfsd/nfs4xdr.c      | 23 +++++++----------------
>  fs/nfsd/nfsfh.c        |  2 +-
>  5 files changed, 12 insertions(+), 21 deletions(-)
> 

This all looks fine.

Reviewed-by: Jeff Layton <jlayton@kernel.org>