Commit 067f3b6b authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: connection: fix non-atomic allocations under spin lock

Use GFP_ATOMIC for IDA memory allocations under spin lock, which must
not sleep.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 5f345a5d
......@@ -63,7 +63,7 @@ static bool gb_connection_hd_cport_id_alloc(struct gb_connection *connection)
int id;
spin_lock_irq(&gb_connections_lock);
id = ida_simple_get(ida, 0, HOST_DEV_CPORT_ID_MAX, GFP_KERNEL);
id = ida_simple_get(ida, 0, HOST_DEV_CPORT_ID_MAX, GFP_ATOMIC);
spin_unlock_irq(&gb_connections_lock);
if (id < 0)
return false;
......
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