mdio-mux-gpio: Remove VLA usage
authorKees Cook <keescook@chromium.org>
Mon, 25 Jun 2018 22:49:49 +0000 (15:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Jun 2018 14:24:07 +0000 (23:24 +0900)
commit68cc444dab1e70e59a719b7bf44bcaacbffa7496
tree43dff5dc1e4652ec13c17e47b3147cf52e18a101
parenta6e65e5d2ca4b1d3ff4ac03e056f82b6854ed50e
mdio-mux-gpio: Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this
allocates the values buffer during the callback instead of putting it
on the stack.

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

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio-mux-gpio.c