]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlxfw: Fix out-of-memory error in mfa2 flash burning
authorVladyslav Tarasiuk <vladyslavt@mellanox.com>
Thu, 26 Dec 2019 08:41:56 +0000 (10:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Dec 2019 19:48:39 +0000 (11:48 -0800)
commitf221e1b90fbb3898bbfe582d1524ba7a9d19b4cc
treea819f759d001be6807ccbd3e50622ab1aa77c3fb
parentfa98afa9ed617b4690b03159b010d404d86419b1
net/mlxfw: Fix out-of-memory error in mfa2 flash burning

The burning process requires to perform internal allocations of large
chunks of memory. This memory doesn't need to be contiguous and can be
safely allocated by vzalloc() instead of kzalloc(). This patch changes
such allocation to avoid possible out-of-memory failure.

Fixes: dc10fdb21829 ("Add the mlxfw module for Mellanox firmware flash process")
Signed-off-by: Vladyslav Tarasiuk <vladyslavt@mellanox.com>
Reviewed-by: Aya Levin <ayal@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Tested-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c