* [PATCH] firewire: sbp2: replace a GFP_ATOMIC allocation
@ 2012-03-04 13:23 Stefan Richter
0 siblings, 0 replies; only message in thread
From: Stefan Richter @ 2012-03-04 13:23 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel
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: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/firewire/sbp2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -569,7 +569,7 @@ static int sbp2_send_management_orb(stru
if (function == SBP2_LOGOUT_REQUEST && fw_device_is_shutdown(device))
return 0;
- orb = kzalloc(sizeof(*orb), GFP_ATOMIC);
+ orb = kzalloc(sizeof(*orb), GFP_NOIO);
if (orb == NULL)
return -ENOMEM;
--
Stefan Richter
-=====-===-- --== --=--
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-04 13:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-04 13:23 [PATCH] firewire: sbp2: replace a GFP_ATOMIC allocation Stefan Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).