Commit:     fde937d826e43c9fe7fecc98b6f3da7188e76930
Parent:     0471448f4d017470995d8a2272dc8c06dbed3b77
Author:     Will Schmidt <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 29 15:49:50 2007 -0500
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Jun 29 21:27:00 2007 -0700

    Fix VDSO gettimeofday() when called with NULL struct timeval.
    The vdso64 portion of patch 74609f4536f2b8fd6a48381bbbe3cd37da20a527 for
    fixing problems with NULL gettimeofday input mistakenly checks for a
    null tz field twice, when it should be checking for null tz once, and
    null tv once; by way of a r10/r11 typo.
    Any application calling gettimeofday(&tv,NULL) will "fail".
    This corrects that typo, and makes my G5 happy.
    Tested on G5.
    Signed-off-by: Will Schmidt <[EMAIL PROTECTED]>
    Cc: Tony Breeds <[EMAIL PROTECTED]>
    Forwarded-by: Ben Herrenschmidt <[EMAIL PROTECTED]>
    [ Ben says: "I checked the 32 bits part of the change is correct.  You
      can probably blame me for originally writing the 2 versions with
      inversed usage of r10 and r11, thus confusing Tony :-)"
      Ben duly blamed.   - Linus ]
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 arch/powerpc/kernel/vdso64/gettimeofday.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S 
index 2d7a510..c6401f9 100644
--- a/arch/powerpc/kernel/vdso64/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso64/gettimeofday.S
@@ -31,7 +31,7 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
        mr      r11,r3                  /* r11 holds tv */
        mr      r10,r4                  /* r10 holds tz */
        bl      V_LOCAL_FUNC(__get_datapage)    /* get data page */
-       cmpldi  r10,0                   /* check if tv is NULL */
+       cmpldi  r11,0                   /* check if tv is NULL */
        beq     2f
        bl      V_LOCAL_FUNC(__do_get_xsec)     /* get xsec from tb & kernel */
        lis     r7,15                   /* r7 = 1000000 = USEC_PER_SEC */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to