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:
parent
69fb09d011
commit
85e6cdde83
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user