aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/tlb_uv.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/tlb_uv.c')
-rw-r--r--arch/x86/kernel/tlb_uv.c12
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)
1001static ssize_t tunables_read(struct file *file, char __user *userbuf, 1001static 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
1290static int __init uv_ptc_init(void) 1296static int __init uv_ptc_init(void)