Commit 17053414 authored by Shradha Gupta's avatar Shradha Gupta Committed by Jakub Kicinski
Browse files

net: mana: Improve mana_set_channels() in low mem conditions



The mana_set_channels() function requires detaching the mana
driver and reattaching it with changed channel values.
During this operation if the system is low on memory, the reattach
might fail, causing the network device being down.
To avoid this we pre-allocate buffers at the beginning of set operation,
to prevent complete network loss

Signed-off-by: default avatarShradha Gupta <shradhagupta@linux.microsoft.com>
Reviewed-by: default avatarGerhard Engleder <gerhard@engleder-embedded.com>
Reviewed-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Link: https://patch.msgid.link/1725248734-21760-1-git-send-email-shradhagupta@linux.microsoft.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 78080120
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment