aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/e1000/e1000_main.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <[email protected]>2020-09-29 20:25:17 +0000
committerDavid S. Miller <[email protected]>2020-09-29 21:02:54 +0000
commitf127bab4fa2083218fc549c7aef6768de7eb871f (patch)
tree4c83a3d55fc9754c064ea2fd91e97c30fe7971b4 /drivers/net/ethernet/intel/e1000/e1000_main.c
parentnet: cxbg4: Remove pointless in_interrupt() check (diff)
downloadkernel-f127bab4fa2083218fc549c7aef6768de7eb871f.tar.gz
kernel-f127bab4fa2083218fc549c7aef6768de7eb871f.zip
net: e100: Remove in_interrupt() usage and pointless GFP_ATOMIC allocation
e100_hw_init() invokes e100_self_test() only if in_interrupt() returns false as e100_self_test() uses msleep() which requires sleepable task context. The in_interrupt() check is incomplete because in_interrupt() cannot catch callers from contexts which have just preemption or interrupts disabled. e100_hw_init() is invoked from: - e100_loopback_test() which clearly is sleepable task context as the function uses msleep() itself. - e100_up() which clearly is sleepable task context as well because it invokes e100_alloc_cbs() abd request_irq() which both require sleepable task context due to GFP_KERNEL allocations and mutex_lock() operations. Remove the pointless in_interrupt() check. As a side effect of this analysis it turned out that e100_rx_alloc_list() which is only invoked from e100_loopback_test() and e100_up() pointlessly uses a GFP_ATOMIC allocation. The next invoked function e100_alloc_cbs() is using GFP_KERNEL already. Change the allocation mode in e100_rx_alloc_list() to GFP_KERNEL as well. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/e1000/e1000_main.c')
0 files changed, 0 insertions, 0 deletions