[BUG] renesas/sh_eth: two possible sleep-in-atomic bugs in sh_eth_set_link_ksettings and sh_eth_nway_reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

sh_eth_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



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux