Pull misc updates from Andrew Morton: "Updates to various subsystems which I help look after. lib, ocfs2, fatfs, autofs, squashfs, procfs, etc. A relatively small amount of material this time" * tag 'mm-nonmm-stable-2022-08-06-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (72 commits) scripts/gdb: ensure the absolute path is generated on initial source MAINTAINERS: kunit: add David Gow as a maintainer of KUnit mailmap: add linux.dev alias for Brendan Higgins mailmap: update Kirill's email profile: setup_profiling_timer() is moslty not implemented ocfs2: fix a typo in a comment ocfs2: use the bitmap API to simplify code ocfs2: remove some useless functions lib/mpi: fix typo 'the the' in comment proc: add some (hopefully) insightful comments bdi: remove enum wb_congested_state kernel/hung_task: fix address space of proc_dohung_task_timeout_secs lib/lzo/lzo1x_compress.c: replace ternary operator with min() and min_t() squashfs: support reading fragments in readahead call squashfs: implement readahead squashfs: always build "file direct" version of page actor Revert "squashfs: provide backing_dev_info in order to disable read-ahead" fs/ocfs2: Fix spelling typo in comment ia64: old_rr4 added under CONFIG_HUGETLB_PAGE proc: fix test for "vsyscall=xonly" boot option ...
Showing the changes to init (1 of 102 files). Show all
Unified · Split
| @@ -11,6 +11,8 @@ · 10 unmodified lines | ||
| 11 | 11 | #include <linux/build-salt.h> |
| 12 | 12 | #include <linux/elfnote-lto.h> |
| 13 | 13 | #include <linux/export.h> |
| 14 | +#include <linux/init.h> | |
| 15 | +#include <linux/printk.h> | |
| 14 | 16 | #include <linux/uts.h> |
| 15 | 17 | #include <linux/utsname.h> |
| 16 | 18 | #include <generated/utsrelease.h> |
| @@ -35,6 +37,21 @@ struct uts_namespace init_uts_ns = { · 18 unmodified lines | ||
| 35 | 37 | }; |
| 36 | 38 | EXPORT_SYMBOL_GPL(init_uts_ns); |
| 37 | 39 | |
| 40 | +static int __init early_hostname(char *arg) | |
| 41 | +{ | |
| 42 | + size_t bufsize = sizeof(init_uts_ns.name.nodename); | |
| 43 | + size_t maxlen = bufsize - 1; | |
| 44 | + size_t arglen; | |
| 45 | + | |
| 46 | + arglen = strlcpy(init_uts_ns.name.nodename, arg, bufsize); | |
| 47 | + if (arglen > maxlen) { | |
| 48 | + pr_warn("hostname parameter exceeds %zd characters and will be truncated", | |
| 49 | + maxlen); | |
| 50 | + } | |
| 51 | + return 0; | |
| 52 | +} | |
| 53 | +early_param("hostname", early_hostname); | |
| 54 | + | |
| 38 | 55 | /* FIXED STRINGS! Don't touch! */ |
| 39 | 56 | const char linux_banner[] = |
| 40 | 57 | "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" |