[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20131219.192136.1089859619183118911.davem@davemloft.net>
Date: Thu, 19 Dec 2013 19:21:36 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: leigh@...inno.co.uk
Cc: nschichan@...ebox.fr, linux@....linux.org.uk, jason@...edaemon.net,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
florian@...nwrt.org, linux-arm-kernel@...ts.infradead.org,
sebastian.hesselbarth@...il.com
Subject: Re: [PATCH v2] net: mvmdio: fix interrupt timeout handling
From: Leigh Brown <leigh@...inno.co.uk>
Date: Thu, 19 Dec 2013 13:09:48 +0000
> This version corrects the whitespace issue.
>
> orion_mdio_wait_ready uses wait_event_timeout to wait for the
> SMI interrupt to fire. wait_event_timeout waits for between
> "timeout - 1" and "timeout" jiffies. In this case a 1ms timeout
> when HZ is 1000 results in a wait of 0 to 1 jiffies, causing
> premature timeouts.
>
> This fix ensures a minimum timeout of 2 jiffies, ensuring
> wait_event_timeout will always wait at least 1 jiffie.
>
> Issue reported by Nicolas Schichan.
>
> Tested-by: Nicolas Schichan <nschichan@...ebox.fr>
> Signed-off-by: Leigh Brown <leigh@...inno.co.uk>
Applied, and queued up for -stable.
I wonder how many other wait_event_timeout() users potentially have
this problem.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists