OpenCloudOS-Kernel/drivers/hwtracing/stm
Alexander Shishkin bf7cbaae08 stm class: Prevent division by zero
Using STP_POLICY_ID_SET ioctl command with dummy_stm device, or any STM
device that supplies zero mmio channel size, will trigger a division by
zero bug in the kernel.

Prevent this by disallowing channel widths other than 1 for such devices.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Fixes: 7bd1d4093c ("stm class: Introduce an abstraction for System Trace Module devices")
CC: stable@vger.kernel.org # v4.4+
2019-02-21 17:44:18 +02:00
..
Kconfig stm class: Add MIPI SyS-T protocol support 2018-10-11 12:12:54 +02:00
Makefile stm class: Add MIPI SyS-T protocol support 2018-10-11 12:12:54 +02:00
console.c stm class: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate 2018-03-28 18:47:17 +03:00
core.c stm class: Prevent division by zero 2019-02-21 17:44:18 +02:00
dummy_stm.c stm class: Make dummy's master/channel ranges configurable 2018-03-28 18:47:18 +03:00
ftrace.c coresight: Moving framework and drivers to SPDX identifier 2018-05-14 16:19:59 +02:00
heartbeat.c stm class: heartbeat: Fix whitespace 2018-10-11 12:12:55 +02:00
p_basic.c stm class: Factor out default framing protocol 2018-10-11 12:12:54 +02:00
p_sys-t.c stm class: p_sys-t: Add support for CLOCKSYNC packets 2018-10-11 12:12:54 +02:00
policy.c stm class: Fix a module refcount leak in policy creation error path 2018-12-19 20:21:06 +01:00
stm.h stm class: Add a helper for writing data packets 2018-10-11 12:12:54 +02:00