diff options
author | Marc Zyngier <[email protected]> | 2013-06-21 12:06:55 +0100 |
---|---|---|
committer | Russell King <[email protected]> | 2013-06-24 15:26:41 +0100 |
commit | b8e4a4740fa2b17c0a447b3ab783b3dc10702e27 (patch) | |
tree | d6315409786d92102af8e057c8c4183d2d002101 /drivers/message/fusion/lsi/mpi_raid.h | |
parent | ae120d9edfe96628f03d87634acda0bfa7110632 (diff) |
ARM: 7768/1: prevent risks of out-of-bound access in ASID allocator
On a CPU that never ran anything, both the active and reserved ASID
fields are set to zero. In this case the ASID_TO_IDX() macro will
return -1, which is not a very useful value to index a bitmap.
Instead of trying to offset the ASID so that ASID #1 is actually
bit 0 in the asid_map bitmap, just always ignore bit 0 and start
the search from bit 1. This makes the code a bit more readable,
and without risk of OoB access.
Cc: <[email protected]> # 3.9
Acked-by: Will Deacon <[email protected]>
Acked-by: Catalin Marinas <[email protected]>
Reported-by: Catalin Marinas <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Signed-off-by: Russell King <[email protected]>
Diffstat (limited to 'drivers/message/fusion/lsi/mpi_raid.h')
0 files changed, 0 insertions, 0 deletions