Alexander Shishkin
8a9b2e08ed
intel_th: Fix a NULL dereference when hub driver is not loaded
...
commit e78e1fdb282726beaf88aa75943682217e6ded0e upstream.
Connecting master to an output port when GTH driver module is not loaded
triggers a NULL dereference:
> RIP: 0010:intel_th_set_output+0x35/0x70 [intel_th]
> Call Trace:
> ? sth_stm_link+0x12/0x20 [intel_th_sth]
> stm_source_link_store+0x164/0x270 [stm_core]
> dev_attr_store+0x17/0x30
> sysfs_kf_write+0x3e/0x50
> kernfs_fop_write+0xda/0x1b0
> __vfs_write+0x1b/0x40
> vfs_write+0xb9/0x1a0
> ksys_write+0x67/0xe0
> __x64_sys_write+0x1a/0x20
> do_syscall_64+0x57/0x1d0
> entry_SYSCALL_64_after_hwframe+0x44/0xa9
Make sure the module in question is loaded and return an error if not.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Fixes: 39f4034693 ("intel_th: Add driver infrastructure for Intel(R) Trace Hub devices")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reported-by: Ammy Yi <ammy.yi@intel.com>
Tested-by: Ammy Yi <ammy.yi@intel.com>
Cc: stable@vger.kernel.org # v4.4
Link: https://lore.kernel.org/r/20200706161339.55468-5-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-22 09:32:12 +02:00
arch
powerpc/book3s64/pkeys: Fix pkey_access_permitted() for execute disable pkey
2020-07-22 09:32:11 +02:00
block
block: release bip in a right way in error path
2020-07-16 08:17:23 +02:00
certs
export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR()
2018-08-22 23:21:44 +09:00
crypto
crypto: af_alg - fix use-after-free in af_alg_accept() due to bh_lock_sock()
2020-07-09 09:37:10 +02:00
Documentation
doc: dt: bindings: usb: dwc3: Update entries for disabling SS instances in park mode
2020-07-22 09:32:04 +02:00
drivers
intel_th: Fix a NULL dereference when hub driver is not loaded
2020-07-22 09:32:12 +02:00
firmware
Fix built-in early-load Intel microcode alignment
2020-01-23 08:21:29 +01:00
fs
fuse: Fix parameter for FS_IOC_{GET,SET}FLAGS
2020-07-22 09:32:10 +02:00
include
virt: vbox: Fix VBGL_IOCTL_VMMDEV_REQUEST_BIG and _LOG req numbers to match upstream
2020-07-22 09:32:09 +02:00
init
x86: Fix early boot crash on gcc-10, third try
2020-05-20 08:18:49 +02:00
ipc
ipc/util.c: sysvipc_find_ipc() incorrectly updates position index
2020-05-20 08:18:40 +02:00
kernel
timer: Fix wheel index calculation on last level
2020-07-22 09:32:11 +02:00
lib
lib/zlib: remove outdated and incorrect pre-increment optimization
2020-06-25 15:33:02 +02:00
LICENSES
LICENSES: Remove CC-BY-SA-4.0 license text
2018-10-18 11:28:50 +02:00
mm
mm/slub: fix stack overruns with SLUB_STATS
2020-07-09 09:37:09 +02:00
net
sched: consistently handle layer3 header accesses in the presence of VLANs
2020-07-22 09:32:00 +02:00
samples
samples: bpf: Fix build error
2020-06-03 08:19:31 +02:00
scripts
kbuild: improve cc-option to clean up all temporary files
2020-06-30 23:17:15 -04:00
security
apparmor: ensure that dfa state tables have entries
2020-07-22 09:32:06 +02:00
sound
ALSA: hda/realtek - Enable Speaker for ASUS UX533 and UX534
2020-07-22 09:32:08 +02:00
tools
perf stat: Zero all the 'ena' and 'run' array slot stats for interval mode
2020-07-22 09:32:06 +02:00
usr
initramfs: restore default compression behavior
2020-04-13 10:44:59 +02:00
virt
KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception
2020-06-22 09:05:09 +02:00
.clang-format
clang-format: Set IndentWrappedFunctionNames false
2018-08-01 18:38:51 +02:00
.cocciconfig
scripts: add Linux .cocciconfig for coccinelle
2016-07-22 12:13:39 +02:00
.get_maintainer.ignore
Add hch to .get_maintainer.ignore
2015-08-21 14:30:10 -07:00
.gitattributes
.gitattributes: set git diff driver for C source code files
2016-10-07 18:46:30 -07:00
.gitignore
Kbuild updates for v4.17 (2nd)
2018-04-15 17:21:30 -07:00
.mailmap
libnvdimm-for-4.19_misc
2018-08-25 18:13:10 -07:00
COPYING
COPYING: use the new text with points to the license files
2018-03-23 12:41:45 -06:00
CREDITS
9p: remove Ron Minnich from MAINTAINERS
2018-08-17 16:20:26 -07:00
Kbuild
Kbuild updates for v4.15
2017-11-17 17:45:29 -08:00
Kconfig
kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt
2018-08-02 08:06:55 +09:00
MAINTAINERS
MAINTAINERS: Update drm/i915 bug filing URL
2020-02-28 16:38:49 +01:00
Makefile
Linux 4.19.133
2020-07-16 08:17:28 +02:00
README
Docs: Added a pointer to the formatted docs to README
2018-03-21 09:02:53 -06:00