diff options
author | 2014-02-04 16:08:38 -0800 | |
---|---|---|
committer | 2014-02-07 09:03:16 -0800 | |
commit | c9e8440eca61298ecccbb27f53036124a7a3c6c8 (patch) | |
tree | 1c29263f6a2ecc828b98293646d8c18381965bed /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | staging: ashmem: Avoid deadlock between read and mmap calls (diff) | |
download | linux-dev-c9e8440eca61298ecccbb27f53036124a7a3c6c8.tar.xz linux-dev-c9e8440eca61298ecccbb27f53036124a7a3c6c8.zip |
staging: ion: Fix overflow and list bugs in system heap
Fix a few bugs in ion_system_heap:
Initialize the list node in the info block.
Don't store size_remaining in a signed long, allocating >2GB
could overflow, resulting in a call to sg_alloc_table with
nents=0 which panics. alloc_largest_available will never
return a block larger than size_remanining, so it can never
go negative.
Limit a single allocation to half of all memory. Prevents a
large allocation from taking down the whole system.
Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: Minor commit subject tweak]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions