Go to file
Jacob Keller 0c03d3d9a9 namespace: fix namespace.pl script to support relative paths
commit 82fdd12b95 upstream.

The namespace.pl script does not work properly if objtree is not set to
an absolute path. The do_nm function is run from within the find
function, which changes directories.

Because of this, appending objtree, $File::Find::dir, and $source, will
return a path which is not valid from the current directory.

This used to work when objtree was set to an absolute path when using
"make namespacecheck". It appears to have not worked when calling
./scripts/namespace.pl directly.

This behavior was changed in 7e1c04779e ("kbuild: Use relative path
for $(objtree)", 2014-05-14)

Rather than fixing the Makefile to set objtree to an absolute path, just
fix namespace.pl to work when srctree and objtree are relative. Also fix
the script to use an absolute path for these by default.

Use the File::Spec module for this purpose. It's been part of perl
5 since 5.005.

The curdir() function is used to get the current directory when the
objtree and srctree aren't set in the environment.

rel2abs() is used to convert possibly relative objtree and srctree
environment variables to absolute paths.

Finally, the catfile() function is used instead of string appending
paths together, since this is more robust when joining paths together.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2019-11-25 11:04:05 -05:00
arch s390/mm: fix -Wunused-but-set-variable warnings 2019-11-25 11:04:03 -05:00
block blk-wbt: fix performance regression in wbt scale_up/scale_down 2019-11-09 19:33:42 -05:00
certs treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
crypto crypto: skcipher - Unmap pages after an external error 2019-11-09 19:32:51 -05:00
Documentation kvm: x86: mmu: Recovery of shattered NX large pages 2019-11-14 11:07:59 -05:00
drivers net: phy: fix write to mii-ctrl1000 register 2019-11-25 11:04:05 -05:00
fs CIFS: Fix use after free of file info structures 2019-11-09 19:33:56 -05:00
include net: phy: fix write to mii-ctrl1000 register 2019-11-25 11:04:05 -05:00
init initramfs: fix populate_initrd_image() section mismatch 2019-06-29 16:43:45 +08:00
ipc ipc: fix sparc64 ipc() wrapper 2019-09-19 09:10:57 +02:00
kernel cpu/speculation: Uninline and export CPU mitigations helpers 2019-11-14 11:07:57 -05:00
lib lib: textsearch: fix escapes in example code 2019-11-25 11:04:03 -05:00
LICENSES LICENSES: Rename other to deprecated 2019-05-03 06:34:32 -06:00
mm mm/vmpressure.c: fix a signedness bug in vmpressure_register_event() 2019-11-09 19:33:45 -05:00
net netfilter: nft_connlimit: disable bh on garbage collection 2019-11-25 11:04:00 -05:00
samples samples: make pidfd-metadata fail gracefully on older kernels 2019-06-24 15:55:50 +02:00
scripts namespace: fix namespace.pl script to support relative paths 2019-11-25 11:04:05 -05:00
security selinux: fix context string corruption in convert_context() 2019-11-09 19:33:43 -05:00
sound ASoC: SOF: ipc: Fix memory leak in sof_set_get_large_ctrl_data 2019-11-25 11:03:50 -05:00
tools selftests: kvm: Fix libkvm build error 2019-11-25 11:04:03 -05:00
usr kbuild: clean compressed initramfs image 2019-10-07 18:59:36 +02:00
virt kvm: x86: mmu: Recovery of shattered NX large pages 2019-11-14 11:07:59 -05:00
.clang-format Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-04-17 11:26:25 -07:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore .gitignore: exclude .get_maintainer.ignore and .gitattributes 2019-05-18 11:49:54 +09:00
.mailmap MAINTAINERS: Update my email address 2019-06-18 14:37:27 +01:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS MAINTAINERS: Farewell Martin Schwidefsky 2019-05-31 10:14:11 +02:00
Kbuild Kbuild updates for v5.1 2019-03-10 17:48:21 -07:00
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
MAINTAINERS A few more MIPS fixes: 2019-07-06 10:32:12 -07:00
Makefile Linux 5.2.23 2019-11-14 11:08:00 -05:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel

There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.

In order to build the documentation, use make htmldocs or make pdfdocs. The formatted documentation can also be read online at:

https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.