[GIT PULL] Some fixes for v5.11

From: Christian Brauner
Date: Mon Dec 14 2020 - 08:29:12 EST


Hi Linus,

Here are some fixes for v5.11.

/* Summary */
This contains several fixes which felt worth being combined into a single pr:
- Use put_nsproxy() instead of open-coding it switch_task_namespaces().
- Kirill's work to unify lifecycle management for all namespaces.
The lifetime counters are used identically for all namespaces types.
Namespaces may of course have additional unrelated counters and these are
not altered. This work allows us to unify the type of the counters and
reduces maintenance cost by moving the counter in one place and
indicating that basic lifetime management is identical for all
namespaces.
- Peilin's fix adding 3 byte padding to Dmitry's PTRACE_GET_SYSCALL_INFO
uapi struct to prevent an info leak.
- Two smal patches to convert from the /* fall through */ comment
annotation to the fallthrough keyword annotation which I had taken into
my branch and into -next before df561f6688fe ("treewide: Use fallthrough
pseudo-keyword") made it upstream which fixed this tree-wide. Since I
didn't want to invalidate all testing for other commits I didn't rebase
and kept them.

The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5:

Linux 5.9-rc1 (2020-08-16 13:04:57 -0700)

are available in the Git repository at:

git@xxxxxxxxxxxxxxxxxxx:pub/scm/linux/kernel/git/brauner/linux tags/fixes-v5.11

for you to fetch changes up to aabe19b8279340c43294688b4d9527a893c60463:

nsproxy: use put_nsproxy() in switch_task_namespaces() (2020-11-19 10:57:02 +0100)

/* Testing */
Most of the patches here have been sitting in -next since
v5.9-rc1; so a rather long time. Especially for the ns counter changes and
the uapi change to the ptrace_get_syscall_info() struct it seemed worth
waiting for a while to be confident there aren't any subtle regressions we
missed. No build failures or warnings were observed. All old and new tests
are passing.

/* Conflicts */
At the time of creating this PR no merge conflicts were reported from
linux-next and no merge conflict with 2c85ebc57b3e ("Linux 5.10") when
pulling the tag.

Please consider pulling these changes from the signed fixes-v5.11 tag.

Thanks!
Christian

----------------------------------------------------------------
fixes-v5.11

----------------------------------------------------------------
Christian Brauner (2):
ns: Add a common refcount into ns_common
net: Use generic ns_common::count

Hui Su (1):
nsproxy: use put_nsproxy() in switch_task_namespaces()

Kirill Tkhai (7):
uts: Use generic ns_common::count
ipc: Use generic ns_common::count
pid: Use generic ns_common::count
user: Use generic ns_common::count
mnt: Use generic ns_common::count
cgroup: Use generic ns_common::count
time: Use generic ns_common::count

Miaohe Lin (2):
signal: Convert to the new fallthrough notation
sys: Convert to the new fallthrough notation

Peilin Ye (1):
ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info()

fs/mount.h | 3 +--
fs/namespace.c | 4 ++--
include/linux/cgroup.h | 5 ++---
include/linux/ipc_namespace.h | 3 +--
include/linux/ns_common.h | 3 +++
include/linux/pid_namespace.h | 4 +---
include/linux/time_namespace.h | 9 ++++-----
include/linux/user_namespace.h | 5 ++---
include/linux/utsname.h | 9 ++++-----
include/net/net_namespace.h | 11 ++++-------
include/uapi/linux/ptrace.h | 3 ++-
init/version.c | 2 +-
ipc/msgutil.c | 2 +-
ipc/namespace.c | 4 ++--
kernel/cgroup/cgroup.c | 2 +-
kernel/cgroup/namespace.c | 2 +-
kernel/nsproxy.c | 6 +++---
kernel/pid.c | 2 +-
kernel/pid_namespace.c | 13 +++----------
kernel/signal.c | 2 +-
kernel/sys.c | 2 +-
kernel/time/namespace.c | 9 +++------
kernel/user.c | 2 +-
kernel/user_namespace.c | 4 ++--
kernel/utsname.c | 7 ++-----
net/core/net-sysfs.c | 6 +++---
net/core/net_namespace.c | 6 +++---
net/ipv4/inet_timewait_sock.c | 4 ++--
net/ipv4/tcp_metrics.c | 2 +-
29 files changed, 58 insertions(+), 78 deletions(-)