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>
(cherry picked from commit 85e6cdde83
)
This commit is contained in:
parent
46cfdca5d5
commit
33b4edf463
@ -1249,7 +1249,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