Magellan Linux

Contents of /trunk/kernel26-magellan/patches-2.6.16-r12/0117-2.6.16.12-strncpy-fix.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 72 - (show annotations) (download)
Mon Jun 5 09:25:38 2006 UTC (17 years, 11 months ago) by niro
File size: 1237 byte(s)
ver bump to 2.6.16-r12:
- updated to linux-2.6.16.19
- updated to ck11

1 From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
2 Date: Tue, 25 Apr 2006 14:59:34 +0000 (+0000)
3 Subject: [PATCH] Alpha: strncpy() fix
4 X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/stable/linux-2.6.16.y.git;a=commitdiff;h=41fd2d35389e0fc809d696f352d7c44850d5a67b
5
6 [PATCH] Alpha: strncpy() fix
7
8 As it turned out after recent SCSI changes, strncpy() was broken -
9 it mixed up the return values from __stxncpy() in registers $24 and $27.
10
11 Thanks to Mathieu Chouquet-Stringer for tracking down the problem
12 and providing an excellent test case.
13
14 Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
15 Signed-off-by: Linus Torvalds <torvalds@osdl.org>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 ---
18
19 --- a/arch/alpha/lib/strncpy.S
20 +++ b/arch/alpha/lib/strncpy.S
21 @@ -43,8 +43,8 @@ strncpy:
22
23 .align 4
24 $multiword:
25 - subq $24, 1, $2 # clear the final bits in the prev word
26 - or $2, $24, $2
27 + subq $27, 1, $2 # clear the final bits in the prev word
28 + or $2, $27, $2
29 zapnot $1, $2, $1
30 subq $18, 1, $18
31
32 @@ -70,8 +70,8 @@ $multiword:
33 bne $18, 0b
34
35 1: ldq_u $1, 0($16) # clear the leading bits in the final word
36 - subq $27, 1, $2
37 - or $2, $27, $2
38 + subq $24, 1, $2
39 + or $2, $24, $2
40
41 zap $1, $2, $1
42 stq_u $1, 0($16)