[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190624053351.5217-1-christophe.jaillet@wanadoo.fr>
Date: Mon, 24 Jun 2019 07:33:51 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: eric@...olt.net, stefan.wahren@...e.com,
gregkh@...uxfoundation.org, f.fainelli@...il.com,
rjui@...adcom.com, sbranden@...adcom.com,
bcm-kernel-feedback-list@...adcom.com, tuomas.tynkkynen@....fi,
inf.braun@....de, tobias.buettner@....de, hofrat@...dl.org
Cc: linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH] staging: bcm2835-camera: Avoid apotential sleep while holding a spin_lock
Do not allocate memory with GFP_KERNEL when holding a spin_lock, it may
sleep. Use GFP_NOWAIT instead.
Fixes: 950fd867c635 ("staging: bcm2835-camera: Replace open-coded idr with a struct idr.")
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
index 16af735af5c3..438d548c6e24 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
@@ -186,7 +186,7 @@ get_msg_context(struct vchiq_mmal_instance *instance)
*/
spin_lock(&instance->context_map_lock);
handle = idr_alloc(&instance->context_map, msg_context,
- 0, 0, GFP_KERNEL);
+ 0, 0, GFP_NOWAIT);
spin_unlock(&instance->context_map_lock);
if (handle < 0) {
--
2.20.1
Powered by blists - more mailing lists