lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 22 Mar 2019 12:14:51 +0100 From: Greg Kroah-Hartman <gregkh@...uxfoundation.org> To: linux-kernel@...r.kernel.org Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, stable@...r.kernel.org, Zhi Jin <zhi.jin@...el.com>, Alexander Shishkin <alexander.shishkin@...ux.intel.com> Subject: [PATCH 4.4 153/230] stm class: Fix an endless loop in channel allocation 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhi Jin <zhi.jin@...el.com> commit a1d75dad3a2c689e70a1c4e0214cca9de741d0aa 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@...el.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@...ux.intel.com> Fixes: 7bd1d4093c2f ("stm class: Introduce an abstraction for System Trace Module devices") CC: stable@...r.kernel.org # v4.4+ Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org> --- drivers/hwtracing/stm/core.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/hwtracing/stm/core.c +++ b/drivers/hwtracing/stm/core.c @@ -229,6 +229,9 @@ static int find_free_channels(unsigned l ; if (i == width) return pos; + + /* step over [pos..pos+i) to continue search */ + pos += i; } return -1;
Powered by blists - more mailing lists