Fix typos

Submitted by Radostin Stoyanov on Feb. 6, 2018, 11:32 p.m.

Details

Message ID 20180206233233.23119-1-rstoyanov1@gmail.com
State New
Series "Fix typos"
Headers show

Commit Message

Radostin Stoyanov Feb. 6, 2018, 11:32 p.m.
Signed-off-by: Radostin Stoyanov <rstoyanov1@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         | 14 +++++++-------
 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 |  2 +-
 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                |  4 ++--
 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(+), 88 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/autofs.c b/criu/autofs.c
index 6432b421..809f2d59 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 8269ab1a..2c1286f4 100644
--- a/criu/bfd.c
+++ b/criu/bfd.c
@@ -215,7 +215,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 ecf24f61..b3478b8a 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 c5171b11..31593ec0 100644
--- a/criu/clone-noasan.c
+++ b/criu/clone-noasan.c
@@ -11,7 +11,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 21d241f6..829a825c 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 35ca7019..7ceff4c1 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -1098,7 +1098,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.
 	 */
@@ -1669,18 +1669,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 3a1c0cd9..6b0fe68b 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -160,7 +160,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.
@@ -295,7 +295,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,
@@ -385,7 +385,7 @@  err:
 
 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.
  */
@@ -1234,12 +1234,12 @@  static inline int fork_with_pid(struct pstree_item *item)
 	}
 
 	/*
-	 * Some kernel modules, such as netwrok packet generator
-	 * run kernel thread upon net-namespace creattion taking
-	 * the @pid we've been requeting via LAST_PID_PATH interface
+	 * Some kernel modules, such as network packet generator
+	 * run kernel thread upon net-namespace creation taking
+	 * the @pid we've been requesting via LAST_PID_PATH interface
 	 * so that we can't restore a take with pid needed.
 	 *
-	 * Here is an idea -- unhare net namespace in callee instead.
+	 * Here is an idea -- unshare net namespace in callee instead.
 	 */
 	/*
 	 * The cgroup namespace is also unshared explicitly in the
diff --git a/criu/cr-service.c b/criu/cr-service.c
index 33d41732..0928df88 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 29a588cc..1cf47b27 100644
--- a/criu/files-reg.c
+++ b/criu/files-reg.c
@@ -302,7 +302,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;
 		}
 	}
@@ -666,7 +666,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;
 	}
 
@@ -1196,7 +1196,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.
 		 */
 
@@ -1217,7 +1217,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 existint 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
@@ -1369,7 +1369,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
@@ -1775,7 +1775,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
@@ -1826,7 +1826,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 0cbd8595..6fb3b067 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -238,7 +238,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>
@@ -1122,7 +1122,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 8f09fd90..1371287f 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 {
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 164f6cc4..459d4857 100644
--- a/criu/kerndat.c
+++ b/criu/kerndat.c
@@ -612,7 +612,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 a2beabdb..4e493670 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 f3b2c224..f705fd32 100644
--- a/criu/mem.c
+++ b/criu/mem.c
@@ -734,7 +734,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;
 	}
@@ -851,7 +851,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;
@@ -1019,7 +1019,7 @@  err_read:
 				return -1;
 			}
 			i++;
-			nr_droped++;
+			nr_dropped++;
 		}
 	}
 
@@ -1029,7 +1029,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;
@@ -1152,7 +1152,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)
@@ -1204,7 +1204,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 bb63ecc8..4bebe622 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -552,12 +552,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.
 	 */
 
@@ -570,7 +570,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;
 
@@ -1037,7 +1037,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;
 	}
@@ -1453,7 +1453,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;					\
@@ -1637,7 +1637,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)
@@ -1844,7 +1844,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;
@@ -2114,8 +2114,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 mount duplications
 	 */
 	if (mi->master_id > 0) {
 		struct mount_info *c;
@@ -2250,7 +2250,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
@@ -2818,7 +2818,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)) {
@@ -3035,7 +3035,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];
 
@@ -3216,7 +3216,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 285974ea..34df516f 100644
--- a/criu/namespaces.c
+++ b/criu/namespaces.c
@@ -1515,7 +1515,7 @@  static 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 853f3ee5..c70aec5f 100644
--- a/criu/page-xfer.c
+++ b/criu/page-xfer.c
@@ -81,7 +81,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
 	 */
@@ -665,7 +665,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 e6470651..b106f883 100644
--- a/criu/pagemap.c
+++ b/criu/pagemap.c
@@ -630,7 +630,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 635c0c08..bc689d26 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 895297f0..358d848d 100644
--- a/criu/shmem.c
+++ b/criu/shmem.c
@@ -31,7 +31,7 @@ 
 #endif
 
 /*
- * Hash table and routines for keeping shmid -> shmem_xinfo mappings 
+ * Hash table and routines for keeping shmid -> shmem_xinfo mappings
  */
 
 /*
@@ -66,7 +66,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
@@ -272,7 +272,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;
@@ -324,7 +324,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 9c73d882..42746719 100644
--- a/criu/sk-tcp.c
+++ b/criu/sk-tcp.c
@@ -31,7 +31,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;
@@ -223,7 +223,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))
@@ -387,7 +387,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 16b4bf3e..9021c1e8 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -386,8 +386,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 cd2370ba..17c684b3 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -886,7 +886,7 @@  static int restore_tty_params(int fd, struct tty_info *info)
 /*
  * When we restore queued data we don't exit if error happened:
  * the terminals never was a transport with guaranted delivery,
- * it's up to application which uses it to guaratee the data
+ * it's up to application which uses it to guarantee the data
  * integrity.
  */
 static void pty_restore_queued_data(struct tty_info *info, int fd)
@@ -2036,7 +2036,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 8dd95df5..e04938cd 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 and 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, )
 

Comments

Andrey Vagin Feb. 7, 2018, 6:21 p.m.
Wow! Applied, Thanks you!

On Tue, Feb 06, 2018 at 11:32:33PM +0000, Radostin Stoyanov wrote:
> Signed-off-by: Radostin Stoyanov <rstoyanov1@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         | 14 +++++++-------
>  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 |  2 +-
>  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                |  4 ++--
>  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(+), 88 deletions(-)
> 
> diff --git a/criu/autofs.c b/criu/autofs.c
> index 6432b421..809f2d59 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 8269ab1a..2c1286f4 100644
> --- a/criu/bfd.c
> +++ b/criu/bfd.c
> @@ -215,7 +215,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 ecf24f61..b3478b8a 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 c5171b11..31593ec0 100644
> --- a/criu/clone-noasan.c
> +++ b/criu/clone-noasan.c
> @@ -11,7 +11,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 21d241f6..829a825c 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 35ca7019..7ceff4c1 100644
> --- a/criu/cr-dump.c
> +++ b/criu/cr-dump.c
> @@ -1098,7 +1098,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.
>  	 */
> @@ -1669,18 +1669,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 3a1c0cd9..6b0fe68b 100644
> --- a/criu/cr-restore.c
> +++ b/criu/cr-restore.c
> @@ -160,7 +160,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.
> @@ -295,7 +295,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,
> @@ -385,7 +385,7 @@ err:
>  
>  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.
>   */
> @@ -1234,12 +1234,12 @@ static inline int fork_with_pid(struct pstree_item *item)
>  	}
>  
>  	/*
> -	 * Some kernel modules, such as netwrok packet generator
> -	 * run kernel thread upon net-namespace creattion taking
> -	 * the @pid we've been requeting via LAST_PID_PATH interface
> +	 * Some kernel modules, such as network packet generator
> +	 * run kernel thread upon net-namespace creation taking
> +	 * the @pid we've been requesting via LAST_PID_PATH interface
>  	 * so that we can't restore a take with pid needed.
>  	 *
> -	 * Here is an idea -- unhare net namespace in callee instead.
> +	 * Here is an idea -- unshare net namespace in callee instead.
>  	 */
>  	/*
>  	 * The cgroup namespace is also unshared explicitly in the
> diff --git a/criu/cr-service.c b/criu/cr-service.c
> index 33d41732..0928df88 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 29a588cc..1cf47b27 100644
> --- a/criu/files-reg.c
> +++ b/criu/files-reg.c
> @@ -302,7 +302,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;
>  		}
>  	}
> @@ -666,7 +666,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;
>  	}
>  
> @@ -1196,7 +1196,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.
>  		 */
>  
> @@ -1217,7 +1217,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 existint 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
> @@ -1369,7 +1369,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
> @@ -1775,7 +1775,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
> @@ -1826,7 +1826,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 0cbd8595..6fb3b067 100644
> --- a/criu/files.c
> +++ b/criu/files.c
> @@ -238,7 +238,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>
> @@ -1122,7 +1122,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 8f09fd90..1371287f 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 {
> 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 164f6cc4..459d4857 100644
> --- a/criu/kerndat.c
> +++ b/criu/kerndat.c
> @@ -612,7 +612,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 a2beabdb..4e493670 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 f3b2c224..f705fd32 100644
> --- a/criu/mem.c
> +++ b/criu/mem.c
> @@ -734,7 +734,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;
>  	}
> @@ -851,7 +851,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;
> @@ -1019,7 +1019,7 @@ err_read:
>  				return -1;
>  			}
>  			i++;
> -			nr_droped++;
> +			nr_dropped++;
>  		}
>  	}
>  
> @@ -1029,7 +1029,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;
> @@ -1152,7 +1152,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)
> @@ -1204,7 +1204,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 bb63ecc8..4bebe622 100644
> --- a/criu/mount.c
> +++ b/criu/mount.c
> @@ -552,12 +552,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.
>  	 */
>  
> @@ -570,7 +570,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;
>  
> @@ -1037,7 +1037,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;
>  	}
> @@ -1453,7 +1453,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;					\
> @@ -1637,7 +1637,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)
> @@ -1844,7 +1844,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;
> @@ -2114,8 +2114,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 mount duplications
>  	 */
>  	if (mi->master_id > 0) {
>  		struct mount_info *c;
> @@ -2250,7 +2250,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
> @@ -2818,7 +2818,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)) {
> @@ -3035,7 +3035,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];
>  
> @@ -3216,7 +3216,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 285974ea..34df516f 100644
> --- a/criu/namespaces.c
> +++ b/criu/namespaces.c
> @@ -1515,7 +1515,7 @@ static 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 853f3ee5..c70aec5f 100644
> --- a/criu/page-xfer.c
> +++ b/criu/page-xfer.c
> @@ -81,7 +81,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
>  	 */
> @@ -665,7 +665,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 e6470651..b106f883 100644
> --- a/criu/pagemap.c
> +++ b/criu/pagemap.c
> @@ -630,7 +630,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 635c0c08..bc689d26 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 895297f0..358d848d 100644
> --- a/criu/shmem.c
> +++ b/criu/shmem.c
> @@ -31,7 +31,7 @@
>  #endif
>  
>  /*
> - * Hash table and routines for keeping shmid -> shmem_xinfo mappings 
> + * Hash table and routines for keeping shmid -> shmem_xinfo mappings
>   */
>  
>  /*
> @@ -66,7 +66,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
> @@ -272,7 +272,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;
> @@ -324,7 +324,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 9c73d882..42746719 100644
> --- a/criu/sk-tcp.c
> +++ b/criu/sk-tcp.c
> @@ -31,7 +31,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;
> @@ -223,7 +223,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))
> @@ -387,7 +387,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 16b4bf3e..9021c1e8 100644
> --- a/criu/sk-unix.c
> +++ b/criu/sk-unix.c
> @@ -386,8 +386,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 cd2370ba..17c684b3 100644
> --- a/criu/tty.c
> +++ b/criu/tty.c
> @@ -886,7 +886,7 @@ static int restore_tty_params(int fd, struct tty_info *info)
>  /*
>   * When we restore queued data we don't exit if error happened:
>   * the terminals never was a transport with guaranted delivery,
> - * it's up to application which uses it to guaratee the data
> + * it's up to application which uses it to guarantee the data
>   * integrity.
>   */
>  static void pty_restore_queued_data(struct tty_info *info, int fd)
> @@ -2036,7 +2036,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 8dd95df5..e04938cd 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 and 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
> 
> _______________________________________________
> CRIU mailing list
> CRIU@openvz.org
> https://lists.openvz.org/mailman/listinfo/criu