From 067f3b6bfaa132269756e4e6d0c61360f8d6a4b5 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Thu, 12 Feb 2015 11:22:47 +0800 Subject: [PATCH] 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 --- drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5