No description
  • C 98.2%
  • Assembly 1%
  • Makefile 0.3%
  • Shell 0.2%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Charles Baylis 7d8c06b8d2 drm: Return -ENOTTY for non-drm ioctls
commit 3abab27c322e0f2acf981595aa8040c9164dc9fb upstream.

drm: Return -ENOTTY for non-drm ioctls

Return -ENOTTY from drm_ioctl() when userspace passes in a cmd number
which doesn't relate to the drm subsystem.

Glibc uses the TCGETS ioctl to implement isatty(), and without this
change isatty() returns it incorrectly returns true for drm devices.

To test run this command:
$ if [ -t 0 ]; then echo is a tty; fi < /dev/dri/card0
which shows "is a tty" without this patch.

This may also modify memory which the userspace application is not
expecting.

Signed-off-by: Charles Baylis <cb-kernel@fishzet.co.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/YPG3IBlzaMhfPqCr@stando.fishzet.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-28 13:31:01 +02:00
arch nds32: fix up stack guard gap 2021-07-28 13:31:01 +02:00
block
certs
crypto
Documentation userfaultfd: do not untag user pointers 2021-07-28 13:31:01 +02:00
drivers drm: Return -ENOTTY for non-drm ioctls 2021-07-28 13:31:01 +02:00
fs hugetlbfs: fix mount mode command line processing 2021-07-28 13:31:01 +02:00
include drm: Return -ENOTTY for non-drm ioctls 2021-07-28 13:31:01 +02:00
init
ipc
kernel tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop. 2021-07-28 13:31:00 +02:00
lib
LICENSES
mm
net net: sched: cls_api: Fix the the wrong parameter 2021-07-28 13:30:58 +02:00
samples
scripts
security
sound ALSA: hdmi: Expose all pins on MSI MS-7C94 board 2021-07-28 13:30:59 +02:00
tools selftest: use mmap instead of posix_memalign to allocate memory 2021-07-28 13:31:01 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 5.4.135 2021-07-25 14:35:16 +02:00
README

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.