[BUG] stmmac: A possible sleep-in-atomic bug in stmmac_suspend

From: Jia-Ju Bai
Date: Sun Oct 08 2017 - 11:14:06 EST


According to stmmac_main.c, the driver may sleep under a spinlock,
and the function call path is:
stmmac_suspend (acquire the spinlock)
stmmac_disable_all_queues
napi_disable
might_sleep --> may sleep
msleep --> may sleep

This bug is found by my static analysis tool and my code review.


Thanks,
Jia-Ju Bai