No description
Find a file
Jiri Olsa d36cc60736 perf tools: Restore proper cwd on return from mnt namespace
[ Upstream commit b01c1f69c8 ]

When reporting on 'record' server we try to retrieve/use the mnt
namespace of the profiled tasks. We use following API with cookie to
hold the return namespace, roughly:

  nsinfo__mountns_enter(struct nsinfo *nsi, struct nscookie *nc)
    setns(newns, 0);
  ...
  new ns related open..
  ...
  nsinfo__mountns_exit(struct nscookie *nc)
    setns(nc->oldns)

Once finished we setns to old namespace, which also sets the current
working directory (cwd) to "/", trashing the cwd we had.

This is mostly fine, because we use absolute paths almost everywhere,
but it screws up 'perf diff':

  # perf diff
  failed to open perf.data: No such file or directory  (try 'perf record' first)
  ...

Adding the current working directory to be part of the cookie and
restoring it in the nsinfo__mountns_exit call.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Krister Johansen <kjlx@templeofstupid.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: 843ff37bb5 ("perf symbols: Find symbols in different mount namespace")
Link: http://lkml.kernel.org/r/20181101170001.30019-1-jolsa@kernel.org
[ No need to check for NULL args for free(), use zfree() for struct members ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-12-17 09:28:49 +01:00
arch s390/cpum_cf: Reject request for sampling in event initialization 2018-12-17 09:28:48 +01:00
block SCSI: fix queue cleanup race before queue initialization is done 2018-11-21 09:24:09 +01:00
certs Replace magic for trusting the secondary keyring with #define 2018-09-09 19:55:54 +02:00
crypto crypto: simd - correctly take reqsize of wrapped skcipher into account 2018-12-01 09:42:53 +01:00
Documentation x86/speculation: Provide IBPB always command line options 2018-12-05 19:41:22 +01:00
drivers hwmon: (w83795) temp4_type has writable permission 2018-12-17 09:28:49 +01:00
firmware License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fs sysv: return 'err' instead of 0 in __sysv_write_inode 2018-12-17 09:28:48 +01:00
include iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-17 09:28:49 +01:00
init init: rename and re-order boot_cpu_state_init() 2018-08-15 18:12:48 +02:00
ipc ipc/sem.c: prevent queue.status tearing in semop 2018-09-05 09:26:30 +02:00
kernel uprobes: Fix handle_swbp() vs. unregister() + register() race once more 2018-12-08 13:03:36 +01:00
lib swiotlb: clean up reporting 2018-12-13 09:18:52 +01:00
mm mm: don't warn about allocations which stall for too long 2018-12-13 09:18:50 +01:00
net netfilter: xt_hashlimit: fix a possible memory leak in htable_create() 2018-12-17 09:28:49 +01:00
samples samples/bpf: Check the error of write() and read() 2018-08-24 13:09:12 +02:00
scripts unifdef: use memcpy instead of strncpy 2018-12-08 13:03:35 +01:00
security ima: re-initialize iint->atomic_flags 2018-12-01 09:43:00 +01:00
sound ASoC: dapm: Recalculate audio map forcely when card instantiated 2018-12-17 09:28:49 +01:00
tools perf tools: Restore proper cwd on return from mnt namespace 2018-12-17 09:28:49 +01:00
usr initramfs: fix initramfs rebuilds w/ compression after disabling 2017-11-03 07:39:19 -07:00
virt KVM: arm64: Fix caching of host MDCR_EL2 value 2018-11-13 11:15:08 -08:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore kbuild: rpm-pkg: keep spec file until make mrproper 2018-02-13 10:19:46 +01:00
.mailmap .mailmap: Add Maciej W. Rozycki's Imagination e-mail address 2017-11-10 12:16:15 -08:00
COPYING
CREDITS MAINTAINERS: update TPM driver infrastructure changes 2017-11-09 17:58:40 -08:00
Kbuild License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
MAINTAINERS MAINTAINERS: Add Sasha as a stable branch maintainer 2018-12-01 09:42:50 +01:00
Makefile Linux 4.14.88 2018-12-13 09:18:54 +01:00
README README: add a new README file, pointing to the Documentation/ 2016-10-24 08:12:35 -02:00

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

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.