mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
vgaarb: fix "target=default" passing
Commit 77c1ff3982 fixed the userspace
pointer dereference, but introduced another bug pointed out by Eugene Teo
in RH bug #564264. Instead of comparing the point we were at in the string,
we instead compared the beginning of the string to "default".
Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
35ef2e922b
commit
7a3a3bba93
@@ -961,7 +961,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
|
||||
remaining -= 7;
|
||||
pr_devel("client 0x%p called 'target'\n", priv);
|
||||
/* if target is default */
|
||||
if (!strncmp(buf, "default", 7))
|
||||
if (!strncmp(curr_pos, "default", 7))
|
||||
pdev = pci_dev_get(vga_default_device());
|
||||
else {
|
||||
if (!vga_pci_str_to_vars(curr_pos, remaining,
|
||||
|
||||
Reference in New Issue
Block a user