mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
isdn: Fix a sleep-in-atomic bug
commit e8f4ae8543 upstream.
The driver may sleep under a spin lock, the function call path is:
isdn_ppp_mp_receive (acquire the lock)
isdn_ppp_mp_reassembly
isdn_ppp_push_higher
isdn_ppp_decompress
isdn_ppp_ccp_reset_trans
isdn_ppp_ccp_reset_alloc_state
kzalloc(GFP_KERNEL) --> may sleep
To fixed it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC".
Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
71a165f639
commit
633763ed93
@@ -2364,7 +2364,7 @@ static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_s
|
||||
id);
|
||||
return NULL;
|
||||
} else {
|
||||
rs = kzalloc(sizeof(struct ippp_ccp_reset_state), GFP_KERNEL);
|
||||
rs = kzalloc(sizeof(struct ippp_ccp_reset_state), GFP_ATOMIC);
|
||||
if (!rs)
|
||||
return NULL;
|
||||
rs->state = CCPResetIdle;
|
||||
|
||||
Reference in New Issue
Block a user