Skip to content

Commit b756862

Browse files
XidianGeneralgregkh
authored andcommitted
isdn: Fix a sleep-in-atomic bug
commit e8f4ae8 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 <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Amit Pundir <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6c78197 commit b756862

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/isdn/i4l/isdn_ppp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2364,7 +2364,7 @@ static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_s
23642364
id);
23652365
return NULL;
23662366
} else {
2367-
rs = kzalloc(sizeof(struct ippp_ccp_reset_state), GFP_KERNEL);
2367+
rs = kzalloc(sizeof(struct ippp_ccp_reset_state), GFP_ATOMIC);
23682368
if (!rs)
23692369
return NULL;
23702370
rs->state = CCPResetIdle;

0 commit comments

Comments
 (0)