From 85e6cdde83c3edc2d2efd3dd29dfd9de1536a838 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Wed, 23 Jan 2013 16:14:07 -0600 Subject: [PATCH] wcb4xxp: Allocate memory in hfc_decode_st_state() with GFP_ATOMIC. hfc_decode_st_state() will be called from interrupt context when the debug flag is set to 32. Therefore, must use GFP_ATOMIC when allocating memory. Only affects the wcb4xxp driver when called with particular debug flags set. Internal-Issue-ID: DAHLIN-314 Reported-by: Gerald Schnabel Signed-off-by: Shaun Ruffell --- drivers/dahdi/wcb4xxp/base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dahdi/wcb4xxp/base.c b/drivers/dahdi/wcb4xxp/base.c index 62e1f64..e70b7c9 100644 --- a/drivers/dahdi/wcb4xxp/base.c +++ b/drivers/dahdi/wcb4xxp/base.c @@ -1242,7 +1242,8 @@ static char *hfc_decode_st_state(struct b4xxp *b4, int port, unsigned char state "?", "?", "?", "?", "?", "?", "?", "?" } }; - if (!(str = kmalloc(256, GFP_KERNEL))) { + str = kmalloc(256, GFP_ATOMIC); + if (!str) { dev_warn(&b4->pdev->dev, "could not allocate mem for ST state decode string!\n"); return NULL; }