commit | 439c79ed7718ee509421ca201a1f1a009bc403d0 | [log] [tgz] |
---|---|---|
author | Doug Berger <[email protected]> | Tue Jul 16 16:26:24 2019 -0700 |
committer | Greg Kroah-Hartman <[email protected]> | Tue Aug 06 19:06:51 2019 +0200 |
tree | 97737615e644943bd8242c822d7c6a5c748f3c6a | |
parent | 1b84e67496d3fd0eb9b9ff345e5428134116d1c6 [diff] |
mm/cma.c: fail if fixed declaration can't be honored [ Upstream commit c633324e311243586675e732249339685e5d6faa ] The description of cma_declare_contiguous() indicates that if the 'fixed' argument is true the reserved contiguous area must be exactly at the address of the 'base' argument. However, the function currently allows the 'base', 'size', and 'limit' arguments to be silently adjusted to meet alignment constraints. This commit enforces the documented behavior through explicit checks that return an error if the region does not fit within a specified region. Link: http://lkml.kernel.org/r/[email protected] Fixes: 5ea3b1b2f8ad ("cma: add placement specifier for "cma=" kernel parameter") Signed-off-by: Doug Berger <[email protected]> Acked-by: Michal Nazarewicz <[email protected]> Cc: Yue Hu <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Peng Fan <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Andrey Konovalov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Sasha Levin <[email protected]>