diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2019-02-22 14:03:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-10 09:17:16 +0300 |
commit | de40920f369488929456b2614b9be14242024279 (patch) | |
tree | 14edba3f09729719d6f7f45951f6e7b9d3a9888c /net/ipv6 | |
parent | b8d048b739007a0fd370b52033cb7357f960e4a0 (diff) | |
download | linux-de40920f369488929456b2614b9be14242024279.tar.xz |
staging: android: ashmem: Avoid range_alloc() allocation with ashmem_mutex held.
commit ecd182cbf4e107928077866399100228d2359c60 upstream.
ashmem_pin() is calling range_shrink() without checking whether
range_alloc() succeeded. Also, doing memory allocation with ashmem_mutex
held should be avoided because ashmem_shrink_scan() tries to hold it.
Therefore, move memory allocation for range_alloc() to ashmem_pin_unpin()
and make range_alloc() not to fail.
This patch is mostly meant for backporting purpose for fuzz testing on
stable/distributor kernels, for there is a plan to remove this code in
near future.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: stable@vger.kernel.org
Reviewed-by: Joel Fernandes <joel@joelfernandes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6')
0 files changed, 0 insertions, 0 deletions