[BUG] renesas/ravb: two possible sleep-in-atomic bugs in ravb_set_link_ksettings and ravb_nway_reset

From: Jia-Ju Bai <hidden>
Date: 2017-12-13 03:43:46
Also in: linux-renesas-soc, lkml

Accoring to drivers/net/ethernet/renesas/ravb_main.c, the driver may sleep under a spinlock.
The function call paths are:
ravb_set_link_ksettings (acquire the spinlock)
  phy_ethtool_ksettings_set
    phy_start_aneg
      phy_start_aneg_priv
        mutex_lock --> may sleep

ravb_nway_reset (acquire the spinlock)
  phy_start_aneg
    phy_start_aneg_priv
      mutex_lock --> may sleep

I do not find a good way to fix them, so I only report.
These possible bugs are found by my static analysis tool (DSAC) and checked by my code review.


Thanks,
Jia-Ju Bai
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help