Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109299
b: refs/heads/master
c: 4b46ca7
h: refs/heads/master
i:
  109297: 78d2374
  109295: f5b2094
v: v3
  • Loading branch information
H. Peter Anvin committed Aug 26, 2008
1 parent 85e97b1 commit a274382
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6f31932d0a1d2b13952f506ebc92675e2d8df80
refs/heads/master: 4b46ca701bdcdc19fcf32823f9fcabf8236e4e78
5 changes: 4 additions & 1 deletion trunk/arch/x86/kernel/cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,17 @@ static ssize_t cpuid_read(struct file *file, char __user *buf,
struct cpuid_regs cmd;
int cpu = iminor(file->f_path.dentry->d_inode);
u64 pos = *ppos;
int err;

if (count % 16)
return -EINVAL; /* Invalid chunk size */

for (; count; count -= 16) {
cmd.eax = pos;
cmd.ecx = pos >> 32;
smp_call_function_single(cpu, cpuid_smp_cpuid, &cmd, 1);
err = smp_call_function_single(cpu, cpuid_smp_cpuid, &cmd, 1);
if (err)
return err;
if (copy_to_user(tmp, &cmd, 16))
return -EFAULT;
tmp += 16;
Expand Down

0 comments on commit a274382

Please sign in to comment.