public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vgaarb: fix typo deference when copying from userspace
@ 2010-01-12 17:58 Tiago Vignatti
  2010-01-12 17:58 ` [PATCH] vgaarb: fix trylock behaviour accordingly vga_tryget return value Tiago Vignatti
  2010-01-12 18:56 ` [PATCH] vgaarb: fix typo deference when copying from userspace Helge Deller
  0 siblings, 2 replies; 6+ messages in thread
From: Tiago Vignatti @ 2010-01-12 17:58 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Jesse Barnes, Benjamin Herrenschmidt, Paulo R. Zanoni, Henry Zhao,
	Andy Getzendanner, Brad Spengler, dri-devel@lists.sf.net,
	linux-kernel@vger.kernel.org, Tiago Vignatti

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-14 15:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 17:58 [PATCH] vgaarb: fix typo deference when copying from userspace Tiago Vignatti
2010-01-12 17:58 ` [PATCH] vgaarb: fix trylock behaviour accordingly vga_tryget return value Tiago Vignatti
2010-01-12 17:58   ` [PATCH-again] vgaarb: use MIT license Tiago Vignatti
2010-01-14 15:07     ` Paulo Zanoni
2010-01-13  4:05   ` [PATCH] vgaarb: fix trylock behaviour accordingly vga_tryget return value Henry Zhao
2010-01-12 18:56 ` [PATCH] vgaarb: fix typo deference when copying from userspace Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox