]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: validate the requested frequency adjustment.
authorRichard Cochran <richardcochran@gmail.com>
Sun, 27 Apr 2014 13:01:27 +0000 (15:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Apr 2014 17:28:43 +0000 (13:28 -0400)
commit9d316e14cca8f6f44abe82b20ceda3e930aeb0e6
tree708d00e333ca4096af001a5ad2b8dfc250f254ab
parent602318f060ac43561c3265e090981cbaca7ff698
ptp: validate the requested frequency adjustment.

PTP Hardware Clock drivers specify a maximum frequency adjustment that
their clocks can accommodate. Normally, user space programs will want to
respect the advertised limits. However, no kernel or driver code checks
that the dialed frequency offset is within the bounds, and out of range
values can lead to surprising results.

This patch fixes the issue by rejecting bad values.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_clock.c