Commit c13ccfcf authored by Stefan Richter's avatar Stefan Richter

firewire: sbp2: replace a GFP_ATOMIC allocation

sbp2_send_management_orb() is called by sbp2_login, sbp2_reconnect, and
sbp2_remove, all which are able to sleep during memory allocations.
Actually, sbp2_send_management_orb() itself is a sleeping function.

Login and remove could allocate with GFP_KERNEL but reconnect needs
GFP_NOIO to ensure progress in low memory situations.
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 6503de65
...@@ -569,7 +569,7 @@ static int sbp2_send_management_orb(struct sbp2_logical_unit *lu, int node_id, ...@@ -569,7 +569,7 @@ static int sbp2_send_management_orb(struct sbp2_logical_unit *lu, int node_id,
if (function == SBP2_LOGOUT_REQUEST && fw_device_is_shutdown(device)) if (function == SBP2_LOGOUT_REQUEST && fw_device_is_shutdown(device))
return 0; return 0;
orb = kzalloc(sizeof(*orb), GFP_ATOMIC); orb = kzalloc(sizeof(*orb), GFP_NOIO);
if (orb == NULL) if (orb == NULL)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment