Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 02-25-10, 08:45 AM   #1
ShiningArcanine
Registered User
 
Join Date: Aug 2006
Posts: 106
Default nvidia-190.53-2.6.33.patch has a bug in it

I posted a bug report on Gentoo's bugzilla a while ago regarding getting the 190.53 drivers to work with kernel 2.6.33 and also posted the patch from here that allows the drivers to work with that kernel version.

Apparently, there is a logical error in the patch that a very clever person caught. Here is the bug report:

http://bugs.gentoo.org/show_bug.cgi?id=301318

I attached the updated patch to the bug report. Anyone running with it will probably want to reinstall their nvidia drivers using the fixed patch, otherwise, they will risk strange things happening when the driver interacts with ACPI.

I probably should have done something about this when Yuval Hager pointed out the issue (or caught the issue myself by actually reading the patch), but I am an undergraduate computer science student and this is all new to me, so I thought it was best to leave such things to more experienced people. Despite that, no one has acted upon this and the 2.6.33 kernel was released yesterday, so I am doing something about it now.
ShiningArcanine is offline   Reply With Quote
Old 03-12-10, 08:59 AM   #2
nomadewolf
Registered User
 
Join Date: Jan 2009
Posts: 7
Default Re: nvidia-190.53-2.6.33.patch has a bug in it

Quote:
Originally Posted by ShiningArcanine View Post
I posted a bug report on Gentoo's bugzilla a while ago regarding getting the 190.53 drivers to work with kernel 2.6.33 and also posted the patch from here that allows the drivers to work with that kernel version.

Apparently, there is a logical error in the patch that a very clever person caught. Here is the bug report:

http://bugs.gentoo.org/show_bug.cgi?id=301318

I attached the updated patch to the bug report. Anyone running with it will probably want to reinstall their nvidia drivers using the fixed patch, otherwise, they will risk strange things happening when the driver interacts with ACPI.

I probably should have done something about this when Yuval Hager pointed out the issue (or caught the issue myself by actually reading the patch), but I am an undergraduate computer science student and this is all new to me, so I thought it was best to leave such things to more experienced people. Despite that, no one has acted upon this and the 2.6.33 kernel was released yesterday, so I am doing something about it now.
Hi!
How do you apply/use the patch, exactly?...
nomadewolf is offline   Reply With Quote
Old 03-12-10, 11:42 AM   #3
dtor
Registered User
 
Join Date: Nov 2004
Posts: 2
Default Re: nvidia-190.53-2.6.33.patch has a bug in it

Heh, not only community patch has a bug in it, but it looks like Nvidia made the same error in their official driver:

#if defined(KERNEL_2_4) || \
(NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT == 6)
#define NV_ACPI_WALK_NAMESPACE(type, args...) acpi_walk_namespace(type, args)
#elif (NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT == 7)
#define NV_ACPI_WALK_NAMESPACE(type, args...) \
acpi_walk_namespace(type, args, NULL)
#else
#error "NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT value unrecognized!"
#endif

As you can see, in the case if 7 arguments NULL is added as the last argument to acpi_walk_namespace().

In all fairness, the bug will only manifest when compiling with DEBUG since the other call site uses NULLs for context and return value arguments as well.
dtor is offline   Reply With Quote
Old 03-15-10, 04:11 PM   #4
martinhex
Registered User
 
Join Date: Mar 2010
Posts: 1
Default Re: nvidia-190.53-2.6.33.patch has a bug in it

Quote:
Originally Posted by nomadewolf View Post
Hi!
How do you apply/use the patch, exactly?...
The following link is specific to Debian, but the instructions are generic enough to be helpful for any distro.

http://forums.debian.net/viewtopic.php?t=24776
martinhex is offline   Reply With Quote
Old 06-15-10, 10:09 PM   #5
ShiningArcanine
Registered User
 
Join Date: Aug 2006
Posts: 106
Default Re: nvidia-190.53-2.6.33.patch has a bug in it

Quote:
Originally Posted by dtor View Post
Heh, not only community patch has a bug in it, but it looks like Nvidia made the same error in their official driver:

#if defined(KERNEL_2_4) || \
(NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT == 6)
#define NV_ACPI_WALK_NAMESPACE(type, args...) acpi_walk_namespace(type, args)
#elif (NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT == 7)
#define NV_ACPI_WALK_NAMESPACE(type, args...) \
acpi_walk_namespace(type, args, NULL)
#else
#error "NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT value unrecognized!"
#endif

As you can see, in the case if 7 arguments NULL is added as the last argument to acpi_walk_namespace().

In all fairness, the bug will only manifest when compiling with DEBUG since the other call site uses NULLs for context and return value arguments as well.
I wish I had seen this several months ago. It would have saved me a great deal of grief and frustration trying to isolate the cause of an issue on my system. I had thought that this issue had been fixed in newer drivers, so I did not bother to check to see if it was the cause, even though it was a perfect candidate.

Assuming you are still reading this, are you sure that this bug will only occurs when compiling with DEBUG options? I ask because I have a Gentoo Linux system where all debug options are supposed to be disabled, I seem to be affected by this issue with all versions of unpatched versions of nvidia's drivers that work with the Linux 2.6.33 kernel.
ShiningArcanine is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:14 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.