Re: [PATCH] rtc.c fix

From: Richard Torkar (ds98rito@thn.htu.se)
Date: Sat Apr 29 2000 - 07:14:47 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 28 Apr 2000, Cesar Eduardo Barros wrote:

>
> This patch fixes several SMP issues found in rtc.c
>
> 1. If running rtc_ioctl RTC_PIE_OFF in one CPU and rtc_interrupt in another at
> the same time, rtc_ioctl might remove the timer after rtc_interrupt had read
> rtc_status but before mod_timer was called, which would leave the timer
> active while rtc_status would say it was off (possible crash on module
> unload)
> 2. rtc_read didn't read rtc_irq_data atomically wrt it being modified in
> rtc_interrupt
> 3. Lots of unneccesary flag savings (no place in the file really needed
> save_flags)
> 4. rtc_freq setting in rtc_ioctl wasn't atomic wrt it being used in
> rtc_interrupt or rtc_proc_output
> 5. On alpha, unless HZ was 1024, rtc_freq would be completely wrong due to it
> being set for the non-alpha case outside a #ifndef __alpha__
> 6. rtc_dropped_irq didn't do everything rtc_interrupt did

The patch you provided has been running on a 2.3.99-pre6 dual 500
Celeron system for 24 hours under heavy load so far... :)

Richard

- ---
Toor: Linux version 2.3.99-pre6 #1 SMP i686 (2244.61 BogoMips)
Linux _is_ user-friendly. It's just selective about its friends.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5CtJAUSLExYo23RsRAmeFAKCMHIvcxEPWtEgt05DygTVhyL9EzgCfRER8
QYDkVKvxCQx7bI2hL5i83g0=
=tNF9
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:16 EST