From: Johan Hovold Date: Thu, 12 Feb 2015 03:22:47 +0000 (+0800) Subject: greybus: connection: fix non-atomic allocations under spin lock X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1697 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=067f3b6bfaa132269756e4e6d0c61360f8d6a4b5;p=karo-tx-linux.git 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: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index c805022c50bc..5f60e83aa37c 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -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;