]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: viohs: Remove VLA usage
authorKees Cook <keescook@chromium.org>
Wed, 5 Sep 2018 22:03:51 +0000 (15:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Oct 2018 05:42:00 +0000 (22:42 -0700)
commit472bec4189f9f55a9cdbb507127ce06db4dadfd9
tree4e2bc3c2bea2aa6b4e644013718cefc9e99f7e37
parent0db618f13a7425119fbf42fbe2790b9e779dc712
sparc64: viohs: Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this
allocates a fixed size array for the maximum number of cookies and
adds a runtime sanity check.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1
RqZWA@mail.gmail.com

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/viohs.c