]> git.baikalelectronics.ru Git - kernel.git/commit
mm/zpool: use prefixed module loading
authorKees Cook <keescook@chromium.org>
Fri, 29 Aug 2014 22:18:40 +0000 (15:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 29 Aug 2014 23:28:16 +0000 (16:28 -0700)
commitde2d4cac3bfe07eb01157501eb25d7fda835dd1f
tree409dde7317a635efd036ce5d3029585988bd9000
parent78d5e8db06f987a8081780bd99446b945e410562
mm/zpool: use prefixed module loading

To avoid potential format string expansion via module parameters, do not
use the zpool type directly in request_module() without a format string.
Additionally, to avoid arbitrary modules being loaded via zpool API
(e.g.  via the zswap_zpool_type module parameter) add a "zpool-" prefix
to the requested module, as well as module aliases for the existing
zpool types (zbud and zsmalloc).

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Seth Jennings <sjennings@variantweb.net>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Acked-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/zbud.c
mm/zpool.c
mm/zsmalloc.c