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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9d371ae6598c4b72838ec72be63cb554@BLUPR03MB373.namprd03.prod.outlook.com>
Date:	Thu, 21 Aug 2014 09:24:12 +0000
From:	"fugang.duan@...escale.com" <fugang.duan@...escale.com>
To:	Richard Cochran <richardcochran@...il.com>
CC:	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"shawn.guo@...aro.org" <shawn.guo@...aro.org>
Subject: RE: [PATCH v4 1/1] net: fec: ptp: avoid register access when ipg
 clock is disabled

From: Richard Cochran <richardcochran@...il.com> Sent: Thursday, August 21, 2014 3:03 PM
>To: Duan Fugang-B38611
>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 for your review, I will send the next.

Thanks,
Andy
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ