summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorpierre Kuo <vichy.kuo@gmail.com>2019-02-19 15:45:00 +0800
committerRob Herring <robh@kernel.org>2019-04-10 09:03:04 -0500
commitd0b8ed47e83a2253897500ea4fcae8e8198942b4 (patch)
tree1e0f07c2d2f28abbcac03e9b6cf9fc33b6ef03c3 /drivers/hid
parentdeb387d4af5a4be3b656b5d69ae4d87ccee325b8 (diff)
downloadlinux-d0b8ed47e83a2253897500ea4fcae8e8198942b4.tar.gz
linux-d0b8ed47e83a2253897500ea4fcae8e8198942b4.tar.bz2
linux-d0b8ed47e83a2253897500ea4fcae8e8198942b4.zip
of: reserved_mem: fix reserve memory leak
The __reserved_mem_init_node will call region specific reserved memory init codes, but once all compatibled init codes failed, the memory region will left in memory.reserved and cause leakage. Take cma reserve memory DTS for example, if user declare 1MB size, which is not align to (PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order)), rmem_cma_setup will return -EINVAL. Meanwhile, rmem_dma_setup will also return -EINVAL since "reusable" property is not set. If finally there is no reserved memory init pick up this memory, kernel will left the 1MB leak in memory.reserved. This patch will remove this kind of memory from memory.reserved, only when __reserved_mem_init_node return neither 0 nor -ENOENT. Signed-off-by: pierre Kuo <vichy.kuo@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/hid')
0 files changed, 0 insertions, 0 deletions