|
@@ -3353,12 +3353,12 @@ tracing_cpumask_read(struct file *filp, char __user *ubuf,
|
|
|
|
|
|
mutex_lock(&tracing_cpumask_update_lock);
|
|
|
|
|
|
- len = cpumask_scnprintf(mask_str, count, tr->tracing_cpumask);
|
|
|
- if (count - len < 2) {
|
|
|
+ len = snprintf(mask_str, count, "%*pb\n",
|
|
|
+ cpumask_pr_args(tr->tracing_cpumask));
|
|
|
+ if (len >= count) {
|
|
|
count = -EINVAL;
|
|
|
goto out_err;
|
|
|
}
|
|
|
- len += sprintf(mask_str + len, "\n");
|
|
|
count = simple_read_from_buffer(ubuf, count, ppos, mask_str, NR_CPUS+1);
|
|
|
|
|
|
out_err:
|