Skip to content

Commit 90280ea

Browse files
committed
Merge tag 'docs-fixes' of git://git.lwn.net/linux
Pull documentation fixes from Jonathan Corbet: "A handful of fixes for reasonably obnoxious documentation issues" * tag 'docs-fixes' of git://git.lwn.net/linux: scripts: documentation-file-ref-check: Add line break before exit scripts/kernel-doc: Add missing close-paren in c:function directives docs: admin-guide: merge sections for the kernel.modprobe sysctl docs: timekeeping: Use correct prototype for deprecated functions
2 parents 5d286d5 + d98dbbe commit 90280ea

File tree

4 files changed

+24
-33
lines changed

4 files changed

+24
-33
lines changed

Documentation/admin-guide/sysctl/kernel.rst

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -390,20 +390,33 @@ When ``kptr_restrict`` is set to 2, kernel pointers printed using
390390
modprobe
391391
========
392392

393-
This gives the full path of the modprobe command which the kernel will
394-
use to load modules. This can be used to debug module loading
395-
requests::
393+
The full path to the usermode helper for autoloading kernel modules,
394+
by default "/sbin/modprobe". This binary is executed when the kernel
395+
requests a module. For example, if userspace passes an unknown
396+
filesystem type to mount(), then the kernel will automatically request
397+
the corresponding filesystem module by executing this usermode helper.
398+
This usermode helper should insert the needed module into the kernel.
399+
400+
This sysctl only affects module autoloading. It has no effect on the
401+
ability to explicitly insert modules.
402+
403+
This sysctl can be used to debug module loading requests::
396404

397405
echo '#! /bin/sh' > /tmp/modprobe
398406
echo 'echo "$@" >> /tmp/modprobe.log' >> /tmp/modprobe
399407
echo 'exec /sbin/modprobe "$@"' >> /tmp/modprobe
400408
chmod a+x /tmp/modprobe
401409
echo /tmp/modprobe > /proc/sys/kernel/modprobe
402410

403-
This only applies when the *kernel* is requesting that the module be
404-
loaded; it won't have any effect if the module is being loaded
405-
explicitly using ``modprobe`` from userspace.
411+
Alternatively, if this sysctl is set to the empty string, then module
412+
autoloading is completely disabled. The kernel will not try to
413+
execute a usermode helper at all, nor will it call the
414+
kernel_module_request LSM hook.
406415

416+
If CONFIG_STATIC_USERMODEHELPER=y is set in the kernel configuration,
417+
then the configured static usermode helper overrides this sysctl,
418+
except that the empty string is still accepted to completely disable
419+
module autoloading as described above.
407420

408421
modules_disabled
409422
================
@@ -446,28 +459,6 @@ Notes:
446459
successful IPC object allocation. If an IPC object allocation syscall
447460
fails, it is undefined if the value remains unmodified or is reset to -1.
448461

449-
modprobe:
450-
=========
451-
452-
The path to the usermode helper for autoloading kernel modules, by
453-
default "/sbin/modprobe". This binary is executed when the kernel
454-
requests a module. For example, if userspace passes an unknown
455-
filesystem type to mount(), then the kernel will automatically request
456-
the corresponding filesystem module by executing this usermode helper.
457-
This usermode helper should insert the needed module into the kernel.
458-
459-
This sysctl only affects module autoloading. It has no effect on the
460-
ability to explicitly insert modules.
461-
462-
If this sysctl is set to the empty string, then module autoloading is
463-
completely disabled. The kernel will not try to execute a usermode
464-
helper at all, nor will it call the kernel_module_request LSM hook.
465-
466-
If CONFIG_STATIC_USERMODEHELPER=y is set in the kernel configuration,
467-
then the configured static usermode helper overrides this sysctl,
468-
except that the empty string is still accepted to completely disable
469-
module autoloading as described above.
470-
471462
nmi_watchdog
472463
============
473464

Documentation/core-api/timekeeping.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ architectures. These are the recommended replacements:
154154
155155
Use ktime_get() or ktime_get_ts64() instead.
156156
157-
.. c:function:: struct timeval do_gettimeofday( void )
158-
struct timespec getnstimeofday( void )
159-
struct timespec64 getnstimeofday64( void )
157+
.. c:function:: void do_gettimeofday( struct timeval * )
158+
void getnstimeofday( struct timespec * )
159+
void getnstimeofday64( struct timespec64 * )
160160
void ktime_get_real_ts( struct timespec * )
161161
162162
ktime_get_real_ts64() is a direct replacement, but consider using

scripts/documentation-file-ref-check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ my $fix = 0;
2525
my $warn = 0;
2626

2727
if (! -d ".git") {
28-
printf "Warning: can't check if file exists, as this is not a git tree";
28+
printf "Warning: can't check if file exists, as this is not a git tree\n";
2929
exit 0;
3030
}
3131

scripts/kernel-doc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ sub output_function_rst(%) {
853853

854854
if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) {
855855
# pointer-to-function
856-
print $1 . $parameter . ") (" . $2;
856+
print $1 . $parameter . ") (" . $2 . ")";
857857
} else {
858858
print $type . " " . $parameter;
859859
}

0 commit comments

Comments
 (0)