Re: [PATCH] stmmac: fix pointer check after utilization in stmmac_interrupt

2020-05-02 Thread David Miller
From: Maxim Petrov Date: Sat, 2 May 2020 12:29:08 +0300 > The paranoidal pointer check in IRQ handler looks very strange - it > really protects us only against bogus drivers which request IRQ line > with null pointer dev_id. However, the code fragment is incorrect > because the dev pointer is

[PATCH] stmmac: fix pointer check after utilization in stmmac_interrupt

2020-05-02 Thread Maxim Petrov
The paranoidal pointer check in IRQ handler looks very strange - it really protects us only against bogus drivers which request IRQ line with null pointer dev_id. However, the code fragment is incorrect because the dev pointer is used before the actual check. That leads to undefined behavior thus