Abort file_remove_privs() for non-reg. files
Alexander Lochmann authored
commit f69e749a

 upstream.

file_remove_privs() might be called for non-regular files, e.g.
blkdev inode. There is no reason to do its job on things
like blkdev inodes, pipes, or cdevs. Hence, abort if
file does not refer to a regular inode.

AV: more to the point, for devices there might be any number of
inodes refering to given device.  Which one to strip the permissions
from, even if that made any sense in the first place?  All of them
will be observed with contents modified, after all.

Found by LockDoc (Alexander Lochmann, Horst Schirmeier and Olaf
Spinczyk)
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarAlexander Lochmann <alexander.lochmann@tu-dortmund.de>
Signed-off-by: default avatarHorst Schirmeier <horst.schirmeier@tu-dortmund.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Cc: Zubin Mithra <zsm@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
2c546242
Name Last commit Last update
Documentation tcp: add tcp_min_snd_mss sysctl
arch KVM: PPC: Book3S HV: Don't take kvm->lock around kvm_for_each_vcpu
block block, bfq: increase idling for weight-raised queues
certs Replace magic for trusting the secondary keyring with #define
crypto crypto: ccm - fix incompatibility between "ccm" and "ccm_base"
drivers infiniband: fix race condition between infiniband mlx4, mlx5 driver and core dumping
firmware License cleanup: add SPDX GPL-2.0 license identifier to files with no license
fs Abort file_remove_privs() for non-reg. files
include coredump: fix race condition between collapse_huge_page() and core dumping
init init: initialize jump labels before command line option parsing
ipc ipc: prevent lockup on alloc_msg and free_msg
kernel perf/ring-buffer: Always use {READ,WRITE}_ONCE() for rb->user_page data
lib test_firmware: Use correct snprintf() limit
mm coredump: fix race condition between collapse_huge_page() and core dumping
net ipvs: Fix use-after-free in ip_vs_in
samples samples: mei: use /dev/mei0 instead of /dev/mei
scripts fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock
security ima: show rules with IMA_INMASK correctly
sound ALSA: hda - Force polling mode on CNL for fixing codec communication
tools perf record: Fix s390 missing module symbol and warning for non-root users
usr initramfs: fix initramfs rebuilds w/ compression after disabling
virt KVM: s390: Do not report unusabled IDs via KVM_CAP_MAX_VCPU_ID
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Add hch to .get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
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.