Skip to content

Commit 5041519

Browse files
Terminus-IMRCpopcornmix
authored andcommitted
vcsm: Fix obscure conditions again
Signed-off-by: Sugizaki Yukimasa <i.can.speak.c.and.basic@gmail.com>
1 parent 4e4a771 commit 5041519

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/char/broadcom/vc_sm/vmcs_sm.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ static unsigned int vmcs_sm_usr_handle_from_pid_and_address(unsigned int pid,
331331
list_for_each_entry(map, &sm_state->map_list, map_list) {
332332
if (map->res_pid != pid)
333333
continue;
334-
if (!(map->res_addr <= addr &&
335-
addr < map->res_addr + map->resource->res_size))
334+
if (addr < map->res_addr ||
335+
addr >= (map->res_addr + map->resource->res_size))
336336
continue;
337337

338338
pr_debug("[%s]: global map %p (pid %u, addr %lx) -> usr-hdl %x (vc-hdl %x)\n",

0 commit comments

Comments
 (0)