]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFSD: Initialize pointer ni with NULL and not plain integer 0
authorColin Ian King <colin.king@canonical.com>
Sat, 25 Sep 2021 22:58:41 +0000 (23:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:18:53 +0000 (16:18 +0200)
[ Upstream commit 8e70bf27fd20cc17e87150327a640e546bfbee64 ]

Pointer ni is being initialized with plain integer zero. Fix
this by initializing with NULL.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4state.c

index f5ac637b6e83d2b376f6c246ff518e4442fcde79..bc7ae9a8604ecb93351d16ab1a4def051447c532 100644 (file)
@@ -1184,7 +1184,7 @@ extern void nfs_sb_deactive(struct super_block *sb);
 static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr,
                struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt)
 {
-       struct nfsd4_ssc_umount_item *ni = 0;
+       struct nfsd4_ssc_umount_item *ni = NULL;
        struct nfsd4_ssc_umount_item *work = NULL;
        struct nfsd4_ssc_umount_item *tmp;
        DEFINE_WAIT(wait);
index 26c4212bcfcde575920fdb77d512d9edc1df34ca..e14b38d6751d8aad2ba2ee2f70ac7a952cbccefe 100644 (file)
@@ -5573,7 +5573,7 @@ static void nfsd4_ssc_shutdown_umount(struct nfsd_net *nn)
 static void nfsd4_ssc_expire_umount(struct nfsd_net *nn)
 {
        bool do_wakeup = false;
-       struct nfsd4_ssc_umount_item *ni = 0;
+       struct nfsd4_ssc_umount_item *ni = NULL;
        struct nfsd4_ssc_umount_item *tmp;
 
        spin_lock(&nn->nfsd_ssc_lock);