diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 6b666d187907cf2f6a5e0baf4cb8ce6f3c8a45b9..6df9b85caf20560b8bafd83777ccabb7ec2f8760 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -2052,7 +2052,8 @@ static int nfs23_validate_mount_data(void *options, memcpy(sap, &data->addr, sizeof(data->addr)); args->nfs_server.addrlen = sizeof(data->addr); args->nfs_server.port = ntohs(data->addr.sin_port); - if (!nfs_verify_server_address(sap)) + if (sap->sa_family != AF_INET || + !nfs_verify_server_address(sap)) goto out_no_address; if (!(data->flags & NFS_MOUNT_TCP))