Created attachment 524222 [details] Fix RTC Freq Read with hpet emulate enabled Description of problem: After setting the frequency value for the RTC clock using the ioctl RTC_IRQP_SET, the value is correctly applied to the rtc clock but when reading it using the RTC_IRQP_READ ioctl, the returned value is incorrect and stays set to 1024 even with root rights. This behaviour applies only when the HPET timer is enabled and when the RTC clock is compiled in the kernel and not in module. In that case, the HPET_EMULATE_RTC option is enabled and ONLY in that case, the returned value is incorrect. This bug is due to the fact, that in the rtc.c file driver, when HPET_EMULATE_RTC is defined the rtc_freq is not set. This issue has already been corrected in the upstream kernel but not backported in the RHEL kernel as described here : http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=61ca9daa2ca3022dc9cb22bd98e69c1b61e412ad. [^] As an attachement, I created a patch in order to build the RPM considering the current SPEC file and sources provided by the SRPM. Version-Release number of selected component (if applicable): 2.6.18-238.19.1.el5 How reproducible: Try to change the clock frequency using the RTC_IRQP_SET ioctl and try to read it with the RTC_IRQP_READ ioctl. Steps to Reproduce: 1.Set the clock frequency with RTC_IRQP_SET 2.Check that the clock is correctly set 3.Read the clock frequency with RTC_IRQP_READ Actual results: The RTC_IRQP_READ returns the default value. Expected results: The RTC_IRQP_READ returns the set value. Additional info: This bug has been open also in CentOS http://bugs.centos.org/view.php?id=5064
Created attachment 538614 [details] RHEL5 fix for this issue
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Patch(es) available in kernel-2.6.18-300.el5 You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5/ Detailed testing feedback is always welcomed. If you require guidance regarding testing, please ask the bug assignee.
Hello, Sorry for the delay but I was missing time for testing your kernel. So I just installed it on my system and here are the result of my test program : $ sudo ./rtc_test RTC Value is 64 SET return code = 0 RTC Value is 64 So the fix is okay for me.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2012-0150.html