mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
24 lines
935 B
Diff
24 lines
935 B
Diff
|
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",
|