Skip to content
Commit 22f6b978 authored by Mitchel Humpherys's avatar Mitchel Humpherys Committed by Greg Kroah-Hartman
Browse files

staging: ion: WARN when the handle kmap_cnt is going to wrap around



There are certain client bugs (double unmap, for example) that can cause
the handle->kmap_cnt (an unsigned int) to wrap around from zero. This
causes problems when the handle is destroyed because we have:

        while (handle->kmap_cnt)
                ion_handle_kmap_put(handle);

which takes a long time to complete when kmap_cnt starts at ~0 and can
result in a watchdog timeout.

WARN and bail when kmap_cnt is about to wrap around from zero.

Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
Acked-by: default avatarColin Cross <ccross@android.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7949f30a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment