summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/of_serial.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2019-02-22 20:03:55 +0900
committerBen Hutchings <ben@decadent.org.uk>2019-07-09 22:04:07 +0100
commit5f2ec3b0fba54db9276f77f22c2fb9ceab6b1101 (patch)
tree9a7dc96f96f1a3ace99241da72442c166fd429fc /drivers/tty/serial/of_serial.c
parent283398ed504d1b5b1fd25766aca7375c84e410b2 (diff)
downloadlinux-stable-5f2ec3b0fba54db9276f77f22c2fb9ceab6b1101.tar.gz
linux-stable-5f2ec3b0fba54db9276f77f22c2fb9ceab6b1101.tar.bz2
linux-stable-5f2ec3b0fba54db9276f77f22c2fb9ceab6b1101.zip
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> Reviewed-by: Joel Fernandes <joel@joelfernandes.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/tty/serial/of_serial.c')
0 files changed, 0 insertions, 0 deletions