2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 03:33:59 +08:00
linux-next/drivers/slimbus
Geert Uytterhoeven e33bbe6914 slimbus: Fix out-of-bounds access in slim_slicesize()
With gcc-4.1.2:

    slimbus/messaging.c: In function ‘slim_slicesize’:
    slimbus/messaging.c:186: warning: statement with no effect

Indeed, clamp() is a macro not operating in-place, but returning the
clamped value.  Hence the value is not clamped at all, which may lead to
an out-of-bounds access.

Fix this by assigning the clamped value.

Fixes: afbdcc7c38 ("slimbus: Add messaging APIs to slimbus framework")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23 13:40:15 +02:00
..
core.c slimbus: core: use put_device() instead of kfree() 2018-03-15 17:55:52 +01:00
Kconfig slimbus: qcom: add HAS_IOMEM dependency 2018-01-09 17:01:15 +01:00
Makefile slimbus: qcom: Add Qualcomm Slimbus controller driver 2017-12-19 11:01:03 +01:00
messaging.c slimbus: Fix out-of-bounds access in slim_slicesize() 2018-04-23 13:40:15 +02:00
qcom-ctrl.c slimbus: qcom: Fix return value check in qcom_slim_probe() 2018-01-09 17:00:13 +01:00
sched.c slimbus: Add support for 'clock-pause' feature 2017-12-19 11:01:03 +01:00
slimbus.h slimbus: core: add common defines required for controllers 2017-12-19 11:01:03 +01:00