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 <sruffell@digium.com>
This commit is contained in:
Shaun Ruffell 2013-01-23 16:14:07 -06:00
parent 69fb09d011
commit 85e6cdde83

View File

@ -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;
}