From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754414Ab0ALS4p (ORCPT ); Tue, 12 Jan 2010 13:56:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754187Ab0ALS4o (ORCPT ); Tue, 12 Jan 2010 13:56:44 -0500 Received: from mail.gmx.net ([213.165.64.20]:50411 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753028Ab0ALS4n (ORCPT ); Tue, 12 Jan 2010 13:56:43 -0500 X-Authenticated: #1045983 X-Provags-ID: V01U2FsdGVkX19oZDNznDFoaPAkdPpziRR5d4/vvVdhuLOjkoEj5I UanIV0rAH5ya4J Message-ID: <4B4CC5E5.5010200@gmx.de> Date: Tue, 12 Jan 2010 19:56:37 +0100 From: Helge Deller User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-3.fc11 Lightning/1.0pre Thunderbird/3.0 MIME-Version: 1.0 To: Tiago Vignatti CC: Dave Airlie , Jesse Barnes , Benjamin Herrenschmidt , "Paulo R. Zanoni" , Henry Zhao , Andy Getzendanner , Brad Spengler , "dri-devel@lists.sf.net" , "linux-kernel@vger.kernel.org" , linux-parisc Subject: Re: [PATCH] vgaarb: fix typo deference when copying from userspace References: <1263319113-6631-1-git-send-email-tiago.vignatti@nokia.com> In-Reply-To: <1263319113-6631-1-git-send-email-tiago.vignatti@nokia.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/12/2010 06:58 PM, Tiago Vignatti wrote: > From: Brad Spengler > > libpciaccess is not triggering such code though. > > Signed-off-by: Tiago Vignatti I can confirm, that this patch is needed to prevent a kernel segfault with 2.6.33-rc3 on the parisc/hppa architecture. Tested-by: Helge Deller > --- > 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,