Netdev List
 help / color / mirror / Atom feed
* [BUG] renesas/ravb: two possible sleep-in-atomic bugs in ravb_set_link_ksettings and ravb_nway_reset
@ 2017-12-13  3:43 Jia-Ju Bai
  0 siblings, 0 replies; only message in thread
From: Jia-Ju Bai @ 2017-12-13  3:43 UTC (permalink / raw)
  To: sergei.shtylyov, davem, horms+renesas, kazuya.mizuguchi.ks,
	niklas.soderlund+renesas, geert+renesas, erosca, yuval.shaia
  Cc: netdev, linux-renesas-soc,
	linux-kernel@vger.kernel.org >> Linux Kernel Mailing List

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-13  3:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-13  3:43 [BUG] renesas/ravb: two possible sleep-in-atomic bugs in ravb_set_link_ksettings and ravb_nway_reset Jia-Ju Bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox