]> git.baikalelectronics.ru Git - kernel.git/commit
Fix VDSO gettimeofday() when called with NULL struct timeval.
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Fri, 29 Jun 2007 20:49:50 +0000 (15:49 -0500)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 30 Jun 2007 04:27:00 +0000 (21:27 -0700)
commit2dd9004aaacf948dc29947a153be86ee2b2f4471
tree6e52722aba4e7fd4a7effecc8a1578d37930cae0
parentbcae86a38a48c5b1c2cb8f5704e7a0bc1d3a0488
Fix VDSO gettimeofday() when called with NULL struct timeval.

The vdso64 portion of patch 2ff6fc0f7f3cefa2fb9b61a0024901ea54c13aab 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 <will_schmidt@vnet.ibm.com>
Cc: Tony Breeds <tony@bakeyournoodle.com>
Forwarded-by: Ben Herrenschmidt <benh@kernel.crashing.org>
[ 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 <torvalds@linux-foundation.org>
arch/powerpc/kernel/vdso64/gettimeofday.S