diff options
author | Linus Torvalds | 2013-03-05 20:56:22 -0600 |
---|---|---|
committer | Linus Torvalds | 2013-03-05 20:56:22 -0600 |
commit | 9f225788cc047fb7c2ef2326eb4f86dee890e2ef (patch) | |
tree | e7571bb7ccc674ec166efb940ad4908bf88b6037 /drivers/tty/hvc/hvcs.c | |
parent | d7b815d4daac154a029faf4e8b687a75530d43be (diff) | |
parent | 54c9b2253d34e8998e4bff9ac2d7a3ba0b861d52 (diff) | |
download | am43-linux-kernel-9f225788cc047fb7c2ef2326eb4f86dee890e2ef.tar.gz am43-linux-kernel-9f225788cc047fb7c2ef2326eb4f86dee890e2ef.tar.xz am43-linux-kernel-9f225788cc047fb7c2ef2326eb4f86dee890e2ef.zip |
Pull powerpc fixes from Ben Herrenschmidt:
"Here are a few powerpc bits & fixes for rc1. A couple of str*cpy
fixes, some fixes in handling the FSCR register on Power8 (controls
the enabling of processor features), a 32-bit build fix and a couple
more nits."
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc: Set DSCR bit in FSCR setup
powerpc: Add DSCR FSCR register bit definition
powerpc: Fix setting FSCR for HV=0 and on secondary CPUs
powerpc: Wireup the kcmp syscall to sys_ni
powerpc: Remove unused BITOP_LE_SWIZZLE macro
powerpc: Avoid link stack corruption in MMU on syscall entry path
drivers/tty/hvc: Use strlcpy instead of strncpy
powerpc/pseries/hvcserver: Fix strncpy buffer limit in location code
powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit
Diffstat (limited to 'drivers/tty/hvc/hvcs.c')
-rw-r--r-- | drivers/tty/hvc/hvcs.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index 1956593ee89..81e939e90c4 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c | |||
@@ -881,17 +881,12 @@ static struct vio_driver hvcs_vio_driver = { | |||
881 | /* Only called from hvcs_get_pi please */ | 881 | /* Only called from hvcs_get_pi please */ |
882 | static void hvcs_set_pi(struct hvcs_partner_info *pi, struct hvcs_struct *hvcsd) | 882 | static void hvcs_set_pi(struct hvcs_partner_info *pi, struct hvcs_struct *hvcsd) |
883 | { | 883 | { |
884 | int clclength; | ||
885 | |||
886 | hvcsd->p_unit_address = pi->unit_address; | 884 | hvcsd->p_unit_address = pi->unit_address; |
887 | hvcsd->p_partition_ID = pi->partition_ID; | 885 | hvcsd->p_partition_ID = pi->partition_ID; |
888 | clclength = strlen(&pi->location_code[0]); | ||
889 | if (clclength > HVCS_CLC_LENGTH) | ||
890 | clclength = HVCS_CLC_LENGTH; | ||
891 | 886 | ||
892 | /* copy the null-term char too */ | 887 | /* copy the null-term char too */ |
893 | strncpy(&hvcsd->p_location_code[0], | 888 | strlcpy(&hvcsd->p_location_code[0], |
894 | &pi->location_code[0], clclength + 1); | 889 | &pi->location_code[0], sizeof(hvcsd->p_location_code)); |
895 | } | 890 | } |
896 | 891 | ||
897 | /* | 892 | /* |