lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 21 Aug 2014 09:02:41 +0200 From: Richard Cochran <richardcochran@...il.com> To: Fugang Duan <b38611@...escale.com> Cc: davem@...emloft.net, netdev@...r.kernel.org, shawn.guo@...aro.org Subject: Re: [PATCH v4 1/1] net: fec: ptp: avoid register access when ipg clock is disabled On Tue, Aug 19, 2014 at 11:20:53AM +0800, Fugang Duan wrote: > The current kernel hang on i.MX6SX with rootfs mount from MMC. > The root cause is ptp rise up period timer to access enet register s/ptp rise up period/that ptp uses a periodic/ > even if ipg clock is disabled. ... > diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c > index 82386b2..6d65555 100644 > --- a/drivers/net/ethernet/freescale/fec_ptp.c > +++ b/drivers/net/ethernet/freescale/fec_ptp.c > @@ -245,12 +245,18 @@ static int fec_ptp_settime(struct ptp_clock_info *ptp, > u64 ns; > unsigned long flags; > > + mutex_lock(&fep->ptp_clk_mutex); > + /* Check the ptp clock */ > + if (!fep->ptp_clk_on) > + return -EINVAL; You are still holding the mutex here. > + > ns = ts->tv_sec * 1000000000ULL; > ns += ts->tv_nsec; > > spin_lock_irqsave(&fep->tmreg_lock, flags); > timecounter_init(&fep->tc, &fep->cc, ns); > spin_unlock_irqrestore(&fep->tmreg_lock, flags); > + mutex_unlock(&fep->ptp_clk_mutex); > return 0; > } Thanks, Richard -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists