Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit dbf6146b authored by Olav Haugan's avatar Olav Haugan Committed by Greg Hackmann
Browse files

UPSTREAM: staging: zsmalloc: Ensure handle is never 0 on success



(cherry-pick from commit 67296874eb1cc80317bf2a8fba22b494e21eb29b)

zsmalloc encodes a handle using the pfn and an object
index. On hardware platforms with physical memory starting
at 0x0 the pfn can be 0. This causes the encoded handle to be
0 and is incorrectly interpreted as an allocation failure.

This issue affects all current and future SoCs with physical
memory starting at 0x0. All MSM8974 SoCs which includes
Google Nexus 5 devices are affected.

To prevent this false error we ensure that the encoded handle
will not be 0 when allocation succeeds.

Bug: 25951511

Change-Id: I6d3c18ba4963c89a673fe633ce1e7a29d767fefa
Signed-off-by: default avatarOlav Haugan <ohaugan@codeaurora.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bb14244f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment