s390/qeth: use vzalloc for QUERY OAT buffer
authorWenjia Zhang <wenjia@linux.ibm.com>
Wed, 12 Sep 2018 13:31:34 +0000 (15:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2018 06:56:03 +0000 (08:56 +0200)
commit31ae67ad9ed6800a54485c27e3b392b58ccf07aa
treedddab2579f14b79bbe39a3fb2ddff00a20ce4305
parentd3a7c76eb49089534ec881a8ba977a98e5d6e43a
s390/qeth: use vzalloc for QUERY OAT buffer

[ Upstream commit aec45e857c5538664edb76a60dd452e3265f37d1 ]

qeth_query_oat_command() currently allocates the kernel buffer for
the SIOC_QETH_QUERY_OAT ioctl with kzalloc. So on systems with
fragmented memory, large allocations may fail (eg. the qethqoat tool by
default uses 132KB).

Solve this issue by using vzalloc, backing the allocation with
non-contiguous memory.

Signed-off-by: Wenjia Zhang <wenjia@linux.ibm.com>
Reviewed-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/net/qeth_core_main.c