lkml.org 
[lkml]   [2010]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] vgaarb: fix typo deference when copying from userspace
Date
From: Brad Spengler <spender@grsecurity.net>

libpciaccess is not triggering such code though.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
---
Andy Getzendanner tried to fix this, but he seems did a wrong approach:
http://marc.info/?l=linux-kernel&m=126112173704466

Andy: please test (and put your tag review!) this one instead. Thanks.

drivers/gpu/vga/vgaarb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
index 1ac0c93..2f6cf69 100644
--- a/drivers/gpu/vga/vgaarb.c
+++ b/drivers/gpu/vga/vgaarb.c
@@ -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,
--
1.6.0.4


\
 
 \ /
  Last update: 2010-01-12 19:17    [W:0.042 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site