NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/42550: possible year2038 problem in MI todr(9)



> I saw similar hang on mac68k with dead battery
> and the problem was resolved after TOD value was corrected.
> 
> >Fix:
> Unknown. Check all possible 32bit overflow?

It looks the following patch (time_t vs long bug) fixes hang
on boot where TODR year is >2038:

Index: miscfs/syncfs/sync_subr.c
===================================================================
RCS file: /cvsroot/src/sys/miscfs/syncfs/sync_subr.c,v
retrieving revision 1.41
diff -u -r1.41 sync_subr.c
--- miscfs/syncfs/sync_subr.c   16 Sep 2009 15:23:04 -0000      1.41
+++ miscfs/syncfs/sync_subr.c   2 Apr 2010 16:51:50 -0000
@@ -224,7 +224,7 @@
 {
        struct synclist *slp;
        struct vnode *vp;
-       long starttime;
+       time_t starttime;
        bool synced;
 
        updateproc = curlwp;

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index