NetBSD-Bugs archive

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

Re: kern/44674: unlocking xscreensaver makes my MacBook1,1 spontaneously reboot



The following reply was made to PR kern/44674; it has been noted by GNATS.

From: Taylor R Campbell <campbell+netbsd%mumble.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/44674: unlocking xscreensaver makes my MacBook1,1 
spontaneously reboot
Date: Thu, 3 Mar 2011 22:19:04 +0000

 (Used the wrong subject line the first time around.  Sorry if this
 duplicated, but I don't think it is.)
 
 Found it: sigtimedwait is broken in COMPAT_50.  Also, /netbsd in my
 unencrypted root and /netbsd in my encrypted `root' on cgd disagreed,
 which is why savecore didn't recognize the core dump; once I fixed
 that I got at the core dump and a stack trace.
 
 Here's the fix.  The CTASSERT is totally needless, idle paranoia.
 
 Index: kern_time_50.c
 ===================================================================
 RCS file: /cvsroot/src/sys/compat/common/kern_time_50.c,v
 retrieving revision 1.18
 diff -p -u -r1.18 kern_time_50.c
 --- kern_time_50.c     19 Jan 2011 10:21:16 -0000      1.18
 +++ kern_time_50.c     3 Mar 2011 22:09:40 -0000
 @@ -453,8 +453,9 @@ static int
  tscopyin(const void *u, void *s, size_t len)
  {
        struct timespec50 ts50;
 -      KASSERT(len == sizeof(ts50));
 -      int error = copyin(u, &ts50, len);
 +      __CTASSERT(sizeof ts50 <= sizeof(struct timespec));
 +      KASSERT(len == sizeof(struct timespec));
 +      int error = copyin(u, &ts50, sizeof ts50);
        if (error)
                return error;
        timespec50_to_timespec(&ts50, s);
 


Home | Main Index | Thread Index | Old Index