aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.14/950-0154-vcsm-Fix-obscure-conditions-again.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm2708/patches-4.14/950-0154-vcsm-Fix-obscure-conditions-again.patch')
-rw-r--r--target/linux/brcm2708/patches-4.14/950-0154-vcsm-Fix-obscure-conditions-again.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.14/950-0154-vcsm-Fix-obscure-conditions-again.patch b/target/linux/brcm2708/patches-4.14/950-0154-vcsm-Fix-obscure-conditions-again.patch
new file mode 100644
index 0000000000..fa2f18cae4
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.14/950-0154-vcsm-Fix-obscure-conditions-again.patch
@@ -0,0 +1,23 @@
+From e573dde8103d381a65acfd2be3964b0d1ba93932 Mon Sep 17 00:00:00 2001
+From: Sugizaki Yukimasa <i.can.speak.c.and.basic@gmail.com>
+Date: Tue, 9 Jan 2018 12:33:24 +0900
+Subject: [PATCH 154/454] vcsm: Fix obscure conditions again
+
+Signed-off-by: Sugizaki Yukimasa <i.can.speak.c.and.basic@gmail.com>
+---
+ drivers/char/broadcom/vc_sm/vmcs_sm.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c
++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c
+@@ -331,8 +331,8 @@ static unsigned int vmcs_sm_usr_handle_f
+ list_for_each_entry(map, &sm_state->map_list, map_list) {
+ if (map->res_pid != pid)
+ continue;
+- if (!(map->res_addr <= addr &&
+- addr < map->res_addr + map->resource->res_size))
++ if (addr < map->res_addr ||
++ addr >= (map->res_addr + map->resource->res_size))
+ continue;
+
+ pr_debug("[%s]: global map %p (pid %u, addr %lx) -> usr-hdl %x (vc-hdl %x)\n",