diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-10-30 04:43:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-30 04:43:08 -0400 |
commit | 169ed55bd30305b933f52bfab32a58671d44ab68 (patch) | |
tree | 32e280957474f458901abfce16fa2a1687ef7497 /arch/x86/kernel/tlb_uv.c | |
parent | 3d7851b3cdd43a734e5cc4c643fd886ab28ad4d5 (diff) | |
parent | 45f81b1c96d9793e47ce925d257ea693ce0b193e (diff) |
Merge branch 'tip/perf/jump-label-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent
Diffstat (limited to 'arch/x86/kernel/tlb_uv.c')
-rw-r--r-- | arch/x86/kernel/tlb_uv.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c index 312ef0292815..20ea20a39e2a 100644 --- a/arch/x86/kernel/tlb_uv.c +++ b/arch/x86/kernel/tlb_uv.c | |||
@@ -1001,10 +1001,10 @@ static int uv_ptc_seq_show(struct seq_file *file, void *data) | |||
1001 | static ssize_t tunables_read(struct file *file, char __user *userbuf, | 1001 | static ssize_t tunables_read(struct file *file, char __user *userbuf, |
1002 | size_t count, loff_t *ppos) | 1002 | size_t count, loff_t *ppos) |
1003 | { | 1003 | { |
1004 | char buf[300]; | 1004 | char *buf; |
1005 | int ret; | 1005 | int ret; |
1006 | 1006 | ||
1007 | ret = snprintf(buf, 300, "%s %s %s\n%d %d %d %d %d %d %d %d %d\n", | 1007 | buf = kasprintf(GFP_KERNEL, "%s %s %s\n%d %d %d %d %d %d %d %d %d\n", |
1008 | "max_bau_concurrent plugged_delay plugsb4reset", | 1008 | "max_bau_concurrent plugged_delay plugsb4reset", |
1009 | "timeoutsb4reset ipi_reset_limit complete_threshold", | 1009 | "timeoutsb4reset ipi_reset_limit complete_threshold", |
1010 | "congested_response_us congested_reps congested_period", | 1010 | "congested_response_us congested_reps congested_period", |
@@ -1012,7 +1012,12 @@ static ssize_t tunables_read(struct file *file, char __user *userbuf, | |||
1012 | timeoutsb4reset, ipi_reset_limit, complete_threshold, | 1012 | timeoutsb4reset, ipi_reset_limit, complete_threshold, |
1013 | congested_response_us, congested_reps, congested_period); | 1013 | congested_response_us, congested_reps, congested_period); |
1014 | 1014 | ||
1015 | return simple_read_from_buffer(userbuf, count, ppos, buf, ret); | 1015 | if (!buf) |
1016 | return -ENOMEM; | ||
1017 | |||
1018 | ret = simple_read_from_buffer(userbuf, count, ppos, buf, strlen(buf)); | ||
1019 | kfree(buf); | ||
1020 | return ret; | ||
1016 | } | 1021 | } |
1017 | 1022 | ||
1018 | /* | 1023 | /* |
@@ -1285,6 +1290,7 @@ static const struct file_operations tunables_fops = { | |||
1285 | .open = tunables_open, | 1290 | .open = tunables_open, |
1286 | .read = tunables_read, | 1291 | .read = tunables_read, |
1287 | .write = tunables_write, | 1292 | .write = tunables_write, |
1293 | .llseek = default_llseek, | ||
1288 | }; | 1294 | }; |
1289 | 1295 | ||
1290 | static int __init uv_ptc_init(void) | 1296 | static int __init uv_ptc_init(void) |