linux-stable/drivers/hwtracing
Zhi Jin dd6ce0316e stm class: Fix an endless loop in channel allocation
commit a1d75dad3a upstream.

There is a bug in the channel allocation logic that leads to an endless
loop when looking for a contiguous range of channels in a range with a
mixture of free and occupied channels. For example, opening three
consequtive channels, closing the first two and requesting 4 channels in
a row will trigger this soft lockup. The bug is that the search loop
forgets to skip over the range once it detects that one channel in that
range is occupied.

Restore the original intent to the logic by fixing the omission.

Signed-off-by: Zhi Jin <zhi.jin@intel.com>
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+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-23 20:09:39 +01:00
..
coresight coresight: etb10: Fix handling of perf mode 2018-11-13 11:08:36 -08:00
intel_th intel_th: msu: Fix an off-by-one in attribute store 2019-01-13 09:51:10 +01:00
stm stm class: Fix an endless loop in channel allocation 2019-03-23 20:09:39 +01:00
Kconfig hwtracing: Add HW tracing support menu 2018-03-29 13:38:10 +03:00