OSDN Git Service

ionic: prevent early watchdog check
authorShannon Nelson <snelson@pensando.io>
Wed, 30 Sep 2020 17:48:28 +0000 (10:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Sep 2020 22:11:09 +0000 (15:11 -0700)
commit0816e0c8188e7db85a7284d3f0f456947ebb049c
treed60af5ae9a50e314c2ec976c267932e6fcadef8e
parentdf8aeaa8268f11dc3c2d0975954624cf324eab15
ionic: prevent early watchdog check

In one corner case scenario, the driver device lif setup can
get delayed such that the ionic_watchdog_cb() timer goes off
before the ionic->lif is set, thus causing a NULL pointer panic.
We catch the problem by checking for a NULL lif just a little
earlier in the callback.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_dev.c