[CRIU] [PATCHv2] Fix typos

Radostin Stoyanov rstoyanov1 at gmail.com
Wed Feb 7 05:40:09 MSK 2018


Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
 criu/autofs.c             |  6 +++---
 criu/bfd.c                |  2 +-
 criu/cgroup-props.c       |  2 +-
 criu/cgroup.c             |  2 +-
 criu/clone-noasan.c       |  2 +-
 criu/cr-check.c           |  2 +-
 criu/cr-dump.c            |  8 ++++----
 criu/cr-restore.c         | 12 +++++++-----
 criu/cr-service.c         |  4 ++--
 criu/fault-injection.c    |  8 ++++----
 criu/fdstore.c            |  2 +-
 criu/files-reg.c          | 14 +++++++-------
 criu/files.c              |  4 ++--
 criu/include/cr_options.h |  4 ++--
 criu/irmap.c              |  2 +-
 criu/kerndat.c            |  2 +-
 criu/log.c                |  4 ++--
 criu/mem.c                | 12 ++++++------
 criu/mount.c              | 26 +++++++++++++-------------
 criu/namespaces.c         |  2 +-
 criu/netfilter.c          |  2 +-
 criu/page-pipe.c          |  2 +-
 criu/page-xfer.c          |  4 ++--
 criu/pagemap.c            |  2 +-
 criu/rst-malloc.c         |  2 +-
 criu/seize.c              |  4 ++--
 criu/shmem.c              |  8 ++++----
 criu/sk-tcp.c             |  6 +++---
 criu/sk-unix.c            |  4 ++--
 criu/sysfs_parse.c        |  2 +-
 criu/tty.c                |  2 +-
 criu/tun.c                |  2 +-
 criu/uffd.c               |  4 ++--
 criu/vdso-compat.c        |  2 +-
 criu/vdso.c               |  4 ++--
 lib/py/criu.py            |  4 ++--
 36 files changed, 88 insertions(+), 86 deletions(-)

diff --git a/criu/autofs.c b/criu/autofs.c
index 8cf5e8ec..576edef6 100644
--- a/criu/autofs.c
+++ b/criu/autofs.c
@@ -345,7 +345,7 @@ free_str:
 
 /*
  * To access the mount point we have to set proper mount namespace.
- * But, unfortunatelly, we have to set proper pid namespace as well,
+ * But, unfortunately, we have to set proper pid namespace as well,
  * because otherwise autofs driver won't find the autofs master.
  */
 static int access_autofs_mount(struct mount_info *pm)
@@ -642,7 +642,7 @@ static int autofs_mnt_set_pipefd(const autofs_info_t *i, int mnt_fd)
 {
 	struct autofs_dev_ioctl param;
 
-	/* Restore pipe and pgrp only for non-cataonic mounts */
+	/* Restore pipe and pgrp only for non-catatonic mounts */
 	if (i->entry->fd == AUTOFS_CATATONIC_FD)
 		return 0;
 
@@ -828,7 +828,7 @@ static autofs_info_t *autofs_create_info(const struct mount_info *mi,
 	memcpy(i->entry, info->entry, sizeof(*info->entry));
 	i->mnt_dev = info->mnt_dev;
 
-	/* We need mountpoint to be able to opne mount in autofs_post_open()
+	/* We need mountpoint to be able to open mount in autofs_post_open()
 	 * callback. And this have to be internal path, because process cwd
 	 * will be changed already. That's why ns_mountpoint is used. */
 	strcpy(i->mnt_path, mi->ns_mountpoint);
diff --git a/criu/bfd.c b/criu/bfd.c
index 4d54543c..5ab27d08 100644
--- a/criu/bfd.c
+++ b/criu/bfd.c
@@ -219,7 +219,7 @@ again:
 
 	/*
 	 * small optimization -- we've scanned b->sz
-	 * symols already, no need to re-scan them after
+	 * symbols already, no need to re-scan them after
 	 * the buffer refill.
 	 */
 	ss = b->sz;
diff --git a/criu/cgroup-props.c b/criu/cgroup-props.c
index f7032bd7..ecd95935 100644
--- a/criu/cgroup-props.c
+++ b/criu/cgroup-props.c
@@ -264,7 +264,7 @@ static int cgp_parse_stream(char *stream, size_t len)
 		}
 
 		if (!eat_word(&stream, &len, "\"strategy\":", 11, true)) {
-			pr_err("Expected \'stategy:\' keyword in controller's %s stream\n",
+			pr_err("Expected \'strategy:\' keyword in controller's %s stream\n",
 			       cgp_entry->cgp.name);
 			goto err_parse;
 		}
diff --git a/criu/cgroup.c b/criu/cgroup.c
index de7ca723..ac15da26 100644
--- a/criu/cgroup.c
+++ b/criu/cgroup.c
@@ -396,7 +396,7 @@ static int dump_cg_props_array(const char *fpath, struct cgroup_dir *ncd, const
 			}
 
 			if (asprintf(&new, "%d", disable) < 0) {
-				pr_err("couldn't aloocate new oom value\n");
+				pr_err("couldn't allocate new oom value\n");
 				free_cgroup_prop(prop);
 				free_all_cgroup_props(ncd);
 				return -1;
diff --git a/criu/clone-noasan.c b/criu/clone-noasan.c
index 0d98c2ed..c44e7196 100644
--- a/criu/clone-noasan.c
+++ b/criu/clone-noasan.c
@@ -13,7 +13,7 @@
  * We need a real stack for clone().
  *
  * To workaround this we add clone_noasan() not-instrumented wrapper for
- * clone(). Unfortunately we can't use __attrbute__((no_sanitize_addresss))
+ * clone(). Unfortunately we can't use __attribute__((no_sanitize_address))
  * for this because of bug in GCC > 6:
  *         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69863
  *
diff --git a/criu/cr-check.c b/criu/cr-check.c
index d72b2fd4..a256d670 100644
--- a/criu/cr-check.c
+++ b/criu/cr-check.c
@@ -250,7 +250,7 @@ static int check_fcntl(void)
 		return -1;
 
 	if (fcntl(fd, F_GETOWNER_UIDS, (long)v)) {
-		pr_perror("Can'r fetch file owner UIDs");
+		pr_perror("Can't fetch file owner UIDs");
 		close(fd);
 		return -1;
 	}
diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index aec726da..0f4f438b 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -1169,7 +1169,7 @@ static int dump_zombies(void)
 		return -1;
 
 	/*
-	 * We dump zombies separately becase for pid-ns case
+	 * We dump zombies separately because for pid-ns case
 	 * we'd have to resolve their pids w/o parasite via
 	 * target ns' proc.
 	 */
@@ -1774,18 +1774,18 @@ static int cr_dump_finish(int ret)
 	 *  - error happened during checkpoint: just clean up
 	 *    everything and continue execution of the dumpee;
 	 *
-	 *  - dump successed but post-dump script returned
+	 *  - dump succeeded but post-dump script returned
 	 *    some ret code: same as in previous scenario --
 	 *    just clean up everything and continue execution,
 	 *    we will return script ret code back to criu caller
 	 *    and it's up to a caller what to do with running instance
 	 *    of the dumpee -- either kill it, or continue running;
 	 *
-	 *  - dump successed but -R option passed, pointing that
+	 *  - dump succeeded but -R option passed, pointing that
 	 *    we're asked to continue execution of the dumpee. It's
 	 *    assumed that a user will use post-dump script to keep
 	 *    consistency of the FS and other resources, we simply
-	 *    start rollback procedure and cleanup everyhting.
+	 *    start rollback procedure and cleanup everything.
 	 */
 	if (ret || post_dump_ret || opts.final_state == TASK_ALIVE) {
 		network_unlock();
diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index f616de81..1c057fbb 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -161,7 +161,7 @@ static inline int stage_current_participants(int next_stage)
 	case CR_STATE_RESTORE:
 		/*
 		 * Each thread has to be reported about this stage,
-		 * so if we want to wait all other tast, we have to
+		 * so if we want to wait all other tasks, we have to
 		 * exclude all threads of the current process.
 		 * It is supposed that we will wait other tasks,
 		 * before creating threads of the current task.
@@ -296,7 +296,7 @@ static struct collect_image_info *cinfos_files[] = {
 	&ext_file_cinfo,
 };
 
-/* These images are requered to restore namespaces */
+/* These images are required to restore namespaces */
 static struct collect_image_info *before_ns_cinfos[] = {
 	&tty_info_cinfo, /* Restore devpts content */
 	&tty_cdata,
@@ -544,7 +544,7 @@ static int populate_pid_proc(void)
 
 static rt_sigaction_t sigchld_act;
 /*
- * If parent's sigaction has blocked SIGKILL (which is non-sence),
+ * If parent's sigaction has blocked SIGKILL (which is non-sense),
  * this parent action is non-valid and shouldn't be inherited.
  * Used to mark parent_act* no more valid.
  */
@@ -2761,8 +2761,10 @@ static inline int decode_posix_timer(PosixTimerEntry *pte,
 	}
 
 	if (pte->vsec == 0 && pte->vnsec == 0) {
-		// Remaining time was too short. Set it to
-		// interval to make the timer armed and work.
+		/*
+		 * Remaining time was too short. Set it to
+		 * interval to make the timer armed and work.
+		 */
 		pt->val.it_value.tv_sec = pte->isec;
 		pt->val.it_value.tv_nsec = pte->insec;
 	} else {
diff --git a/criu/cr-service.c b/criu/cr-service.c
index a1e637af..274ff218 100644
--- a/criu/cr-service.c
+++ b/criu/cr-service.c
@@ -559,7 +559,7 @@ static int dump_using_req(int sk, CriuOpts *req)
 	/*
 	 * FIXME -- cr_dump_tasks() may return code from custom
 	 * scripts, that can be positive. However, right now we
-	 * don't have ability to push scripts via RPC, so psitive
+	 * don't have ability to push scripts via RPC, so positive
 	 * ret values are impossible here.
 	 */
 	if (cr_dump_tasks(req->pid))
@@ -899,7 +899,7 @@ static int handle_feature_check(int sk, CriuReq * msg)
 		/*
 		 * If this point is reached the information about the features
 		 * is transmitted from the forked CRIU process (here).
-		 * If an error occured earlier, the feature check response will be
+		 * If an error occurred earlier, the feature check response will be
 		 * be send from the parent process.
 		 */
 		ret = send_criu_msg(sk, &resp);
diff --git a/criu/fault-injection.c b/criu/fault-injection.c
index f239fd9d..4128814d 100644
--- a/criu/fault-injection.c
+++ b/criu/fault-injection.c
@@ -6,17 +6,17 @@ enum faults fi_strategy;
 int fault_injection_init()
 {
 	char *val;
-	int strat;
+	int start;
 
 	val = getenv("CRIU_FAULT");
 	if (val == NULL)
 		return 0;
 
-	strat = atoi(val);
+	start = atoi(val);
 
-	if (strat <= 0 || strat >= FI_MAX)
+	if (start <= 0 || start >= FI_MAX)
 		return -1;
 
-	fi_strategy = strat;
+	fi_strategy = start;
 	return 0;
 }
diff --git a/criu/fdstore.c b/criu/fdstore.c
index d9bed4d5..8d3a6c89 100644
--- a/criu/fdstore.c
+++ b/criu/fdstore.c
@@ -54,7 +54,7 @@ int fdstore_init(void)
 	 * This socket is connected to itself, so all messages are queued to
 	 * its receive queue. Here we are going to use this socket to store
 	 * file descriptors. For that we need to send a file descriptor in
-	 * a queue and remeber its sequence number. Then we can set SO_PEEK_OFF
+	 * a queue and remember its sequence number. Then we can set SO_PEEK_OFF
 	 * to get a file descriptor without dequeuing it.
 	 */
 	if (bind(sk, (struct sockaddr *) &addr, addrlen)) {
diff --git a/criu/files-reg.c b/criu/files-reg.c
index 23528589..5e63b964 100644
--- a/criu/files-reg.c
+++ b/criu/files-reg.c
@@ -342,7 +342,7 @@ static int ghost_apply_metadata(const char *path, GhostFileEntry *gfe)
 		tv[1].tv_sec = gfe->mtim->tv_sec;
 		tv[1].tv_usec = gfe->mtim->tv_usec;
 		if (lutimes(path, tv)) {
-			pr_perror("Can't set access and modufication times on ghost %s", path);
+			pr_perror("Can't set access and modification times on ghost %s", path);
 			goto err;
 		}
 	}
@@ -708,7 +708,7 @@ static int clean_one_remap(struct remap_info *ri)
 
 	rmntns_root = open(path, O_RDONLY);
 	if (rmntns_root < 0) {
-		pr_perror("Unbale to open %s", path);
+		pr_perror("Unable to open %s", path);
 		return -1;
 	}
 
@@ -1238,7 +1238,7 @@ static int check_path_remap(struct fd_link *link, const struct fd_parms *parms,
 		/*
 		 * Linked file, but path is not accessible (unless any
 		 * other error occurred). We can create a temporary link to it
-		 * uning linkat with AT_EMPTY_PATH flag and remap it to this
+		 * using linkat with AT_EMPTY_PATH flag and remap it to this
 		 * name.
 		 */
 
@@ -1259,7 +1259,7 @@ static int check_path_remap(struct fd_link *link, const struct fd_parms *parms,
 		 * FIXME linked file, but the name we see it by is reused
 		 * by somebody else. We can dump it with linked remaps, but
 		 * we'll have difficulties on restore -- we will have to
-		 * move the exisint file aside, then restore this one,
+		 * move the existing file aside, then restore this one,
 		 * unlink, then move the original file back. It's fairly
 		 * easy to do, but we don't do it now, since unlinked files
 		 * have the "(deleted)" suffix in proc and name conflict
@@ -1411,7 +1411,7 @@ static int linkat_hard(int odir, char *opath, int ndir, char *npath, uid_t uid,
 	}
 
 	/*
-	 * Kernel before 4.3 has strange secutiry restrictions about
+	 * Kernel before 4.3 has strange security restrictions about
 	 * linkat. If the fsuid of the caller doesn't equals
 	 * the uid of the file and the file is not "safe"
 	 * one, then only global CAP_CHOWN will be allowed
@@ -1817,7 +1817,7 @@ struct filemap_ctx {
 	 * put a new one into ctx.
 	 *
 	 * True is used by premap, so that it just calls vm_open
-	 * in sequence, immediatelly mmap()s the file, then it
+	 * in sequence, immediately mmap()s the file, then it
 	 * can be closed.
 	 *
 	 * False is used by open_vmas() which pre-opens the files
@@ -1868,7 +1868,7 @@ static int open_filemap(int pid, struct vma_area *vma)
 	int ret;
 
 	/*
-	 * Thevma->fd should have been assigned in collect_filemap
+	 * The vma->fd should have been assigned in collect_filemap
 	 *
 	 * We open file w/o lseek, as mappings don't care about it
 	 */
diff --git a/criu/files.c b/criu/files.c
index 8d46e58e..2a2e07e6 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -261,7 +261,7 @@ void show_saved_files(void)
  *
  * This is here only to support the Linux Kernel between versions
  * 3.18 and 4.2. After that, this workaround is not needed anymore,
- * but it will work properly on both a kernel with and withouth the bug.
+ * but it will work properly on both a kernel with and without the bug.
  *
  * When a process has a file open in an OverlayFS directory,
  * the information in /proc/<pid>/fd/<fd> and /proc/<pid>/fdinfo/<fd>
@@ -1167,7 +1167,7 @@ static int open_fd(struct fdinfo_list_entry *fle)
 
 	/*
 	 * Open method returns the following values:
-	 * 0  -- restore is successefuly finished;
+	 * 0  -- restore is successfully finished;
 	 * 1  -- restore is in process or can't be started
 	 *       yet, because of it depends on another fles,
 	 *       so the method should be called once again;
diff --git a/criu/include/cr_options.h b/criu/include/cr_options.h
index bc74b39a..f0e84c1a 100644
--- a/criu/include/cr_options.h
+++ b/criu/include/cr_options.h
@@ -12,7 +12,7 @@
 #define CPU_CAP_ALL		(-1u)
 #define CPU_CAP_FPU		(1u)		/* Only FPU capability required */
 #define CPU_CAP_CPU		(2u)		/* Strict CPU capability required */
-#define CPU_CAP_INS		(4u)		/* Instructions CPU capatibility */
+#define CPU_CAP_INS (4u)			/* Instructions CPU capability */
 #define CPU_CAP_DEFAULT		(CPU_CAP_FPU)
 
 struct cg_root_opt {
@@ -95,7 +95,7 @@ struct cr_options {
 	bool			autodetect_ext_mounts;
 	int			enable_external_sharing;
 	int			enable_external_masters;
-	bool			aufs;		/* auto-deteced, not via cli */
+	bool			aufs;		/* auto-detected, not via cli */
 	bool			overlayfs;
 #ifdef CONFIG_BINFMT_MISC_VIRTUALIZED
 	bool			has_binfmt_misc; /* auto-detected */
diff --git a/criu/irmap.c b/criu/irmap.c
index 107e0f29..e7298421 100644
--- a/criu/irmap.c
+++ b/criu/irmap.c
@@ -5,7 +5,7 @@
  * so that we can restore inotify/fanotify-s.
  *
  * Scanning _is_ slow, so we limit it with hints, which are
- * heurisitical known places where notifies are typically put.
+ * heuristically known places where notifies are typically put.
  */
 
 #include <stdbool.h>
diff --git a/criu/kerndat.c b/criu/kerndat.c
index 68abd618..4a8fc8ed 100644
--- a/criu/kerndat.c
+++ b/criu/kerndat.c
@@ -703,7 +703,7 @@ static int kerndat_detect_stack_guard_gap(void)
 
 		/*
 		 * When reading /proc/$pid/[s]maps the
-		 * start/end addresses migh be cutted off
+		 * start/end addresses might be cutted off
 		 * with PAGE_SIZE on kernels prior 4.12
 		 * (see kernel commit 1be7107fbe18ee).
 		 *
diff --git a/criu/log.c b/criu/log.c
index 100ddc79..be3e4499 100644
--- a/criu/log.c
+++ b/criu/log.c
@@ -112,7 +112,7 @@ static void log_note_err(char *msg)
 		/*
 		 * In any action other than restore this locking is
 		 * actually not required, but ... it's error path
-		 * anyway, so it doesn't make much sence to try hard
+		 * anyway, so it doesn't make much sense to try hard
 		 * and optimize this out.
 		 */
 		mutex_lock(&first_err->l);
@@ -142,7 +142,7 @@ int log_init(const char *output)
 	if (output && !strncmp(output, "-", 2)) {
 		new_logfd = dup(STDOUT_FILENO);
 		if (new_logfd < 0) {
-			pr_perror("Cant't dup stdout stream");
+			pr_perror("Can't dup stdout stream");
 			return -1;
 		}
 	} else if (output) {
diff --git a/criu/mem.c b/criu/mem.c
index 1089270d..4c6942a1 100644
--- a/criu/mem.c
+++ b/criu/mem.c
@@ -737,7 +737,7 @@ static int premap_private_vma(struct pstree_item *t, struct vma_area *vma, void
 	pr_debug("\tpremap %#016"PRIx64"-%#016"PRIx64" -> %016lx\n",
 		vma->e->start, vma->e->end, (unsigned long)addr);
 
-	if (vma_has_guard_gap_hidden(vma)) { /* Skip gurad page */
+	if (vma_has_guard_gap_hidden(vma)) { /* Skip guard page */
 		vma->e->start += PAGE_SIZE;
 		vma->premmaped_addr += PAGE_SIZE;
 	}
@@ -854,7 +854,7 @@ static int restore_priv_vma_content(struct pstree_item *t, struct page_read *pr)
 
 	unsigned int nr_restored = 0;
 	unsigned int nr_shared = 0;
-	unsigned int nr_droped = 0;
+	unsigned int nr_dropped = 0;
 	unsigned int nr_compared = 0;
 	unsigned int nr_lazy = 0;
 	unsigned long va;
@@ -1027,7 +1027,7 @@ err_read:
 				return -1;
 			}
 			i++;
-			nr_droped++;
+			nr_dropped++;
 		}
 	}
 
@@ -1037,7 +1037,7 @@ err_read:
 
 	pr_info("nr_restored_pages: %d\n", nr_restored);
 	pr_info("nr_shared_pages:   %d\n", nr_shared);
-	pr_info("nr_droped_pages:   %d\n", nr_droped);
+	pr_info("nr_dropped_pages:   %d\n", nr_dropped);
 	pr_info("nr_lazy:           %d\n", nr_lazy);
 
 	return 0;
@@ -1160,7 +1160,7 @@ bool vma_has_guard_gap_hidden(struct vma_area *vma)
 }
 
 /*
- * A gard page must be unmapped after restoring content and
+ * A guard page must be unmapped after restoring content and
  * forking children to restore COW memory.
  */
 int unmap_guard_pages(struct pstree_item *t)
@@ -1212,7 +1212,7 @@ int open_vmas(struct pstree_item *t)
 		/*
 		 * File mappings have vm_open set to open_filemap which, in
 		 * turn, puts the VMA_CLOSE bit itself. For all the rest we
-		 * need to put it by hads, so that the restorer closes the fd
+		 * need to put it by hands, so that the restorer closes the fd
 		 */
 		if (!(vma_area_is(vma, VMA_FILE_PRIVATE) ||
 					vma_area_is(vma, VMA_FILE_SHARED)))
diff --git a/criu/mount.c b/criu/mount.c
index 4c7fd091..a369e43d 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -554,12 +554,12 @@ static int validate_shared(struct mount_info *m)
 	/*
 	 * Check that all mounts in one shared group has the same set of
 	 * children. Only visible children are accounted. A non-root bind-mount
-	 * doesn't see children out of its root and it's excpected case.
+	 * doesn't see children out of its root and it's expected case.
 	 *
 	 * Here is a few conditions:
 	 * 1. t is wider than m
 	 * 2. We search a wider mount in the same direction, so when we
-	 *    enumirate all mounts, we can't be sure that all of them
+	 *    enumerate all mounts, we can't be sure that all of them
 	 *    has the same set of children.
 	 */
 
@@ -572,7 +572,7 @@ static int validate_shared(struct mount_info *m)
 		 */
 		return 0;
 
-	/* Search a child, which is visiable in both mounts. */
+	/* Search a child, which is visible in both mounts. */
 	list_for_each_entry(ct, &t->children, siblings) {
 		struct mount_info *cm;
 
@@ -1047,7 +1047,7 @@ int __open_mountpoint(struct mount_info *pm, int mnt_fd)
 	}
 
 	if (pm->s_dev_rt == MOUNT_INVALID_DEV) {
-		pr_err("Resolving over unvalid device for %#x %s %s\n",
+		pr_err("Resolving over invalid device for %#x %s %s\n",
 		       pm->s_dev, pm->fstype->name, pm->ns_mountpoint);
 		goto err;
 	}
@@ -1673,7 +1673,7 @@ err:
  * _fn_f  - pre-order traversal function
  * _fn_f  - post-order traversal function
  * _plist - a postpone list. _el is added to this list, if _fn_f returns
- *	    a positive value, and all lower elements are not enumirated.
+ *	    a positive value, and all lower elements are not enumerated.
  */
 #define MNT_TREE_WALK(_r, _el, _fn_f, _fn_r, _plist, _prgs) do {		\
 		struct mount_info *_mi = _r;					\
@@ -1857,7 +1857,7 @@ static int propagate_siblings(struct mount_info *mi)
 
 	/*
 	 * Find all mounts, which must be bind-mounted from this one
-	 * to inherite shared group or master id
+	 * to inherit shared group or master id
 	 */
 	list_for_each_entry(t, &mi->mnt_share, mnt_share) {
 		if (t->mounted)
@@ -2064,7 +2064,7 @@ static int do_new_mount(struct mount_info *mi)
 		sflags |= MS_RDONLY;
 		if (userns_call(apply_sb_flags, 0,
 				&sflags, sizeof(sflags), fd)) {
-			pr_perror("Unable to apply mount falgs %d for %s",
+			pr_perror("Unable to apply mount flags %d for %s",
 						mi->sb_flags, mi->mountpoint);
 			close(fd);
 			return -1;
@@ -2334,8 +2334,8 @@ static bool can_mount_now(struct mount_info *mi)
 	/*
 	 * We're the slave peer:
 	 *   - Make sure the master peer is already mounted
-	 *   - Make sure all children is mounted as well to
-	 *     eliminame mounts duplications
+	 *   - Make sure all children are mounted as well to
+	 *     eliminate mounts duplications
 	 */
 	if (mi->master_id > 0) {
 		struct mount_info *c;
@@ -2470,7 +2470,7 @@ static int do_umount_one(struct mount_info *mi)
 }
 
 /*
- * If a mount overmounts other mounts, it is restored separetly in the roots
+ * If a mount overmounts other mounts, it is restored separately in the roots
  * yard and then moved to the right place.
  *
  * mnt_remap_entry is created for each such mount and it's added into
@@ -3012,7 +3012,7 @@ static int populate_roots_yard(void)
 
 	/*
 	 * mnt_remap_list is filled in find_remap_mounts() and
-	 * contains mounts which has to be restored separatly
+	 * contains mounts which has to be restored separately
 	 */
 	list_for_each_entry(r, &mnt_remap_list, node) {
 		if (mkdirpat(AT_FDCWD, r->mi->mountpoint, 0755)) {
@@ -3218,7 +3218,7 @@ int prepare_mnt_ns(void)
 	if (rst < 0)
 		return -1;
 
-	/* resotre non-root namespaces */
+	/* restore non-root namespaces */
 	for (nsid = ns_ids; nsid != NULL; nsid = nsid->next) {
 		char path[PATH_MAX];
 
@@ -3404,7 +3404,7 @@ struct ns_id *lookup_nsid_by_mnt_id(int mnt_id)
 	 * Kernel before 3.15 doesn't show mnt_id for file descriptors.
 	 * mnt_id isn't saved for files, if mntns isn't dumped.
 	 * In both these cases we have only one root, so here
-	 * is not matter which mount will be restured.
+	 * is not matter which mount will be restored.
 	 */
 	if (mnt_id == -1)
 		mi = mntinfo;
diff --git a/criu/namespaces.c b/criu/namespaces.c
index 5c469764..e7c55340 100644
--- a/criu/namespaces.c
+++ b/criu/namespaces.c
@@ -2216,7 +2216,7 @@ int prepare_userns_creds(void)
 	/*
 	 * This flag is dropped after entering userns, but is
 	 * required to access files in /proc, so put one here
-	 * temoprarily. It will be set to proper value at the
+	 * temporarily. It will be set to proper value at the
 	 * very end.
 	 */
 	if (prctl(PR_SET_DUMPABLE, 1, 0)) {
diff --git a/criu/netfilter.c b/criu/netfilter.c
index 991c7181..368651c7 100644
--- a/criu/netfilter.c
+++ b/criu/netfilter.c
@@ -19,7 +19,7 @@ static char buf[512];
 
 /*
  * Need to configure simple netfilter rules for blocking connections
- * ANy brave soul to write it using xtables-devel?
+ * Any brave soul to write it using xtables-devel?
  */
 
 #define NF_CONN_CMD	"%s %s -t filter %s %s --protocol tcp " \
diff --git a/criu/page-pipe.c b/criu/page-pipe.c
index f33e86a4..eb09882c 100644
--- a/criu/page-pipe.c
+++ b/criu/page-pipe.c
@@ -391,7 +391,7 @@ int page_pipe_read(struct page_pipe *pp, struct pipe_read_dest *prd,
 	*nr_pages = len / PAGE_SIZE;
 
 	skip += ppb->pipe_off * PAGE_SIZE;
-	/* we should tee() the requested lenth + the beginning of the pipe */
+	/* we should tee() the requested length + the beginning of the pipe */
 	len += skip;
 
 	ret = tee(ppb->p[0], prd->p[1], len, 0);
diff --git a/criu/page-xfer.c b/criu/page-xfer.c
index b1624059..bf77a249 100644
--- a/criu/page-xfer.c
+++ b/criu/page-xfer.c
@@ -82,7 +82,7 @@ static int decode_pm(u64 dst_id, unsigned long *id)
 
 	/*
 	 * Magic numbers below came from the older CRIU versions that
-	 * errorneously used the changing CR_FD_* constants. The
+	 * erroneously used the changing CR_FD_* constants. The
 	 * changes were made when we merged images together and moved
 	 * the CR_FD_-s at the tail of the enum
 	 */
@@ -687,7 +687,7 @@ static int page_server_add(int sk, struct page_server_iov *pi, u32 flags)
 		/*
 		 * Splicing into a pipe may end up blocking if pipe is "full",
 		 * and we need the SPLICE_F_NONBLOCK flag here. At the same time
-		 * splcing from UNIX socket with this flag aborts splice with
+		 * splicing from UNIX socket with this flag aborts splice with
 		 * the EAGAIN if there's no data in it (TCP looks at the socket
 		 * O_NONBLOCK flag _only_ and waits for data), so before doing
 		 * the non-blocking splice we need to explicitly wait.
diff --git a/criu/pagemap.c b/criu/pagemap.c
index a61a9545..227db6bf 100644
--- a/criu/pagemap.c
+++ b/criu/pagemap.c
@@ -679,7 +679,7 @@ static void init_compat_pagemap_entry(PagemapEntry *pe)
 	/*
 	 * pagemap image generated with older version will either
 	 * contain a hole because the pages are in the parent
-	 * shanpshot or a pagemap that should be marked with
+	 * snapshot or a pagemap that should be marked with
 	 * PE_PRESENT
 	 */
 	if (pe->has_in_parent && pe->in_parent)
diff --git a/criu/rst-malloc.c b/criu/rst-malloc.c
index 4f7357ca..ff96797e 100644
--- a/criu/rst-malloc.c
+++ b/criu/rst-malloc.c
@@ -72,7 +72,7 @@ static int grow_remap(struct rst_mem_type_s *t, int flag, unsigned long size)
 			/*
 			 * Anon shared memory cannot grow with
 			 * mremap, anon-shmem file size doesn't
-			 * chage and memory access generates
+			 * change and memory access generates
 			 * SIGBUS. We should truncate the guy,
 			 * but for now we don't need it.
 			 */
diff --git a/criu/seize.c b/criu/seize.c
index 0a36b721..e1780c7e 100644
--- a/criu/seize.c
+++ b/criu/seize.c
@@ -142,7 +142,7 @@ static int seize_cgroup_tree(char *root_path, const char *state)
 			if (stat(buf, &st) == -1 && errno == ENOENT)
 				continue;
 			/*
-			 * fails when meets a zombie, or eixting process:
+			 * fails when meets a zombie, or exiting process:
 			 * there is a small race in a kernel -- the process
 			 * may start exiting and we are trying to freeze it
 			 * before it compete exit procedure. The caller simply
@@ -350,7 +350,7 @@ static int freeze_processes(void)
 		nr_attempts = (10 * 1000000) / step_ms;
 	}
 
-	pr_debug("freezing processes: %lu attempst with %lu ms steps\n",
+	pr_debug("freezing processes: %lu attempts with %lu ms steps\n",
 		 nr_attempts, step_ms);
 
 	snprintf(path, sizeof(path), "%s/freezer.state", opts.freeze_cgroup);
diff --git a/criu/shmem.c b/criu/shmem.c
index 01381163..62bb161e 100644
--- a/criu/shmem.c
+++ b/criu/shmem.c
@@ -32,7 +32,7 @@
 #endif
 
 /*
- * Hash table and routines for keeping shmid -> shmem_xinfo mappings 
+ * Hash table and routines for keeping shmid -> shmem_xinfo mappings
  */
 
 /*
@@ -67,7 +67,7 @@ struct shmem_info {
 			int		fd;
 
 			/*
-			 * 0. lock is initilized to zero
+			 * 0. lock is initialized to zero
 			 * 1. the master opens a descriptor and set lock to 1
 			 * 2. slaves open their descriptors and increment lock
 			 * 3. the master waits all slaves on lock. After that
@@ -273,7 +273,7 @@ int fixup_sysv_shmems(void)
 			}
 
 			/*
-			 * See comment in open_shmem_sysv() about this PROT_EXEC 
+			 * See comment in open_shmem_sysv() about this PROT_EXEC
 			 */
 			if (si->want_write)
 				att->first->prot |= PROT_EXEC;
@@ -325,7 +325,7 @@ static int open_shmem_sysv(int pid, struct vma_area *vma)
 	 * whether to create the segment rw or ro, but the
 	 * first vma can have different protection. So the
 	 * segment ro-ness is marked with PROT_EXEC bit in
-	 * the first vma. Unfortunatelly, we only know this
+	 * the first vma. Unfortunately, we only know this
 	 * after we scan all the vmas, so this bit is set
 	 * at the end in fixup_sysv_shmems().
 	 */
diff --git a/criu/sk-tcp.c b/criu/sk-tcp.c
index c4354b34..97e5a86c 100644
--- a/criu/sk-tcp.c
+++ b/criu/sk-tcp.c
@@ -32,7 +32,7 @@
 static LIST_HEAD(cpt_tcp_repair_sockets);
 static LIST_HEAD(rst_tcp_repair_sockets);
 
-static int tcp_repair_establised(int fd, struct inet_sk_desc *sk)
+static int tcp_repair_established(int fd, struct inet_sk_desc *sk)
 {
 	int ret;
 	struct libsoccr_sk *socr;
@@ -224,7 +224,7 @@ int dump_one_tcp(int fd, struct inet_sk_desc *sk)
 
 	pr_info("Dumping TCP connection\n");
 
-	if (tcp_repair_establised(fd, sk))
+	if (tcp_repair_established(fd, sk))
 		return -1;
 
 	if (dump_tcp_conn_state(sk))
@@ -392,7 +392,7 @@ int prepare_tcp_socks(struct task_restore_args *ta)
 
 		/*
 		 * rst_tcp_repair_sockets contains all sockets, so we need to
-		 * select sockets which restored in a current porcess.
+		 * select sockets which restored in a current process.
 		 */
 		if (ii->sk_fd == -1)
 			continue;
diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index db5e1c63..30167861 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -403,8 +403,8 @@ static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p)
 			/*
 			 * Usually this doesn't happen, however it's possible if
 			 * socket was shut down before connect() (see sockets03.c test).
-			 * On restore we will shutdown both end (iow socktes will be in
-			 * matched state). This shoudn't be a problem, since kernel seems
+			 * On restore we will shutdown both end (iow sockets will be in
+			 * matched state). This shouldn't be a problem, since kernel seems
 			 * to check both ends on read()/write(). Thus mismatched sockets behave
 			 * the same way as matched.
 			 */
diff --git a/criu/sysfs_parse.c b/criu/sysfs_parse.c
index bd678a6e..922e5d41 100644
--- a/criu/sysfs_parse.c
+++ b/criu/sysfs_parse.c
@@ -242,7 +242,7 @@ int parse_aufs_branches(struct mount_info *mi)
 
 		fclose(fp);
 		/*
-		 * Log branch information for extenal utitilies that
+		 * Log branch information for external utitilies that
 		 * want to recreate the process's AUFS filesystem
 		 * before calling criu restore.
 		 *
diff --git a/criu/tty.c b/criu/tty.c
index 1c8cf678..4eb69243 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -2150,7 +2150,7 @@ static int tty_do_dump_queued_data(struct tty_dump_info *dinfo)
 			 ret, (int)off, dinfo->driver->name, dinfo->id);
 
 		if (off >= size) {
-			pr_err("The tty (%s %#x) queued data overrflow %zu bytes limit\n",
+			pr_err("The tty (%s %#x) queued data overflow %zu bytes limit\n",
 			       dinfo->driver->name, dinfo->id, size);
 			off = size;
 			break;
diff --git a/criu/tun.c b/criu/tun.c
index acd40ea1..dfca4b12 100644
--- a/criu/tun.c
+++ b/criu/tun.c
@@ -292,7 +292,7 @@ static int dump_tunfile(int lfd, u32 id, const struct fd_parms *p)
 
 		/*
 		 * Otherwise this is just opened file with not yet attached
-		 * tun device. Go agead an write the respective entry.
+		 * tun device. Go ahead an write the respective entry.
 		 */
 	} else {
 		tfe.netdev = ifr.ifr_name;
diff --git a/criu/uffd.c b/criu/uffd.c
index 72fc1402..97d2d05b 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -808,7 +808,7 @@ static int uffd_zero(struct lazy_pages_info *lpi, __u64 address, int nr_pages)
 /*
  * Seek for the requested address in the pagemap. If it is found, the
  * subsequent call to pr->page_read will bring us the data. If the
- * address is not found in the pagemap, but no error occured, the
+ * address is not found in the pagemap, but no error occurred, the
  * address should be mapped to zero pfn.
  *
  * Returns 0 for zero pages, 1 for "real" pages and negative value on
@@ -1213,7 +1213,7 @@ static int lazy_sk_read_event(struct epoll_rfd *rfd)
 		return 0;
 
 	if (ret != sizeof(fin)) {
-		pr_perror("Failed getting restore finished inidication");
+		pr_perror("Failed getting restore finished indication");
 		return -1;
 	}
 
diff --git a/criu/vdso-compat.c b/criu/vdso-compat.c
index 6d763281..a68c0bac 100644
--- a/criu/vdso-compat.c
+++ b/criu/vdso-compat.c
@@ -66,7 +66,7 @@ void compat_vdso_helper(struct vdso_maps *native, int pipe_fd,
 
 	ret = syscall(__NR_read, pipe_fd, &vdso_addr, sizeof(void *));
 	if (ret != sizeof(void *))
-		exit_on(-1, err_fd, "Error: Can't read size of mmaped vdso from pipe\n");
+		exit_on(-1, err_fd, "Error: Can't read size of mapped vdso from pipe\n");
 
 	memcpy(vdso_buf, vdso_addr, vdso_size);
 
diff --git a/criu/vdso.c b/criu/vdso.c
index 731f9416..ea142ea8 100644
--- a/criu/vdso.c
+++ b/criu/vdso.c
@@ -167,14 +167,14 @@ static void drop_rt_vdso(struct vm_area_list *vma_area_list,
 		}
 	}
 
-	pr_debug("vdso: Droppping marked vdso at %lx\n",
+	pr_debug("vdso: Dropping marked vdso at %lx\n",
 			(long)rt_vdso_marked->e->start);
 	list_del(&rt_vdso_marked->list);
 	xfree(rt_vdso_marked);
 	vma_area_list->nr--;
 
 	if (rt_vvar_marked) {
-		pr_debug("vdso: Droppping marked vvar at %lx\n",
+		pr_debug("vdso: Dropping marked vvar at %lx\n",
 				(long)rt_vvar_marked->e->start);
 		list_del(&rt_vvar_marked->list);
 		xfree(rt_vvar_marked);
diff --git a/lib/py/criu.py b/lib/py/criu.py
index cafaea8f..e4e46b52 100644
--- a/lib/py/criu.py
+++ b/lib/py/criu.py
@@ -56,7 +56,7 @@ class _criu_comm_sk(_criu_comm):
 
 class _criu_comm_fd(_criu_comm):
 	"""
-	Commnunication class for file descriptor.
+	Communication class for file descriptor.
 	"""
 	def __init__(self, fd):
 		self.comm_type = self.COMM_FD
@@ -164,7 +164,7 @@ class CRIUExceptionExternal(CRIUException):
 		s = "%s failed: " % (rpc.criu_req_type.Name(self.typ), )
 
 		if self.typ != self.resp_typ:
-			s += "Unxecpected response type %d: " % (self.resp_typ, )
+			s += "Unexpected response type %d: " % (self.resp_typ, )
 
 		s += "Error(%d): " % (self.errno, )
 
-- 
2.14.3



More information about the CRIU mailing list