You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
freifunkist-firmware/target/linux/brcm2708/patches-4.14/950-0154-vcsm-Fix-obscure-c...

23 lines
935 B

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",